@totigm/discord-bot
v1.1.0
Published
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.
Downloads
389
Readme
📄 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
- Reference documentation
- Options
- Set up a discord bot
- Discord.js v12 docs
- Bot builder
- WhatsApp bot
- GitHub
- NPM
💻 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:
⚙️ 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
🤝 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