Options
All
  • Public
  • Public/Protected
  • All
Menu

Discord Utils - v1.2.7

Discord Utils

This is a collection of JavaScript/NodeJS utilities for discord bot development.

Build Status codecov npm (scoped) node-current NPM npm GitHub issues GitHub pull requests

Getting Started

These instructions will get you up and running with discord-utils. All you need is to install using your favourite package manager then require into your code.

Prerequisites

I haven't tested this on earlier versions of node. The version it's tested on is v12.16.0.

Installing

Using NPM:

npm i @kl13nt/discord-utils

Using Yarn:

yarn add @kl13nt/discord-utils

Available Functionalities

To see function names either use import/require in your code (I have full types available) or simply inspect the index.ts file in src. A general classification can be:

  • Moderation Utils: To mute, warn, and ban members.
  • Object Utils: Helpers for when working with objects such as GuildMember or TextChannel objects.
  • Embed Utils: Helpers for when creating embeds.
  • General Utils: Parsers for different mention types and role handling.

Usage

Without any bundlers:

// import all functions and classes
const utils = require('@kl13nt/discord-utils');

// import specific functions
const { capitalise } = require('@kl13nt/discord-utils');

capitalise('hello world! this should be capitalised as title case.'); // Hello World! This Should Be Capitalised As Title Case.

Contributing

Check CONTRIBUTING.md in this repo.

Changelog

Check CHANGELOG.md in this repo, which is automatically generated using standard-version.

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE Version 3 - see the LICENSE file for details.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

Generated using TypeDoc