@totigm/discord-bot
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i @totigm/discord-bot

Weekly Downloads

89

Version

1.1.0

License

MIT

Unpacked Size

10.4 kB

Total Files

12

Last publish

Collaborators

  • totigm