totigm / discord-bot

This is a library to create Discord bots. It handles all the commands stuff behind the scenes, so you can focus on your bot's logic.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to @totigm/discord-bot πŸ‘‹

NPM version GitHub repo Downloads CI GitHub repo stars Documentation License: MIT

πŸ“„ Introduction

This is a library to create Discord bots. It is a Discord implementation of the @totigm/bot-builder package, which handles all the commands stuff behind the scenes, so you can focus on your bot's logic.

The discord.js v12 library is being used.

πŸ”— Quick links

πŸ’» Installation

npm i @totigm/discord-bot

or

yarn add @totigm/discord-bot

πŸš€ Getting started

Check this tutorial on how to create a discord bot.

Start adding commands to your bot by checking the reference documentation.

πŸ€– Example usage

import DiscordBot from "@totigm/discord-bot";

const bot = new DiscordBot("YOUR_DISCORD_BOT_TOKEN");

bot.addCommand("hey", (message) => `Hey ${message.author.username}! How are you doing?`, {
    description: "Say hey",
    explanation: "The bot will say hey to the user using their Discord's name",
    example: {
        output: "Hey Toti! How are you doing?",
    },
});

The previous code will create a bot that works like this:

bot conversation

βš™οΈ Options

When you create a bot, you can pass an options object to customize it. Check its options documentation for more information.

const options = { ... };

const bot = new DiscordBot("YOUR_BOTS_TOKEN", options);

πŸ‘€ Author

GitHub: totigm
Twitter: totigm8
LinkedIn: totigm
NPM: totigm

🀝 Contributing

Contributions are more than welcome!

We think that you might have great ideas to make this project even better. If you do, please create a pull request and/or issue following the contribution guidelines.

⭐️ Show your support

Give a ⭐️ if this project helped you!

πŸ“ License

Copyright Β© 2022 Toti MuΓ±oz.
This project is MIT licensed.


This project was made with ❀ and TypeScript

About

This is a library to create Discord bots. It handles all the commands stuff behind the scenes, so you can focus on your bot's logic.

License:MIT License


Languages

Language:TypeScript 100.0%