1.1.0 • Published 4 months ago

@totigm/discord-bot v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

📄 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

🤝 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

1.1.0

4 months ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago