Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/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.
https://github.com/totigm/discord-bot
bot bot-builder botbuilder bots discord discord-bot discord-js typescript
Last synced: 3 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/totigm/discord-bot
- Owner: totigm
- License: mit
- Created: 2022-08-17T15:38:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-14T11:59:09.000Z (about 1 year ago)
- Last Synced: 2024-09-17T03:55:13.113Z (5 months ago)
- Topics: bot, bot-builder, botbuilder, bots, discord, discord-bot, discord-js, typescript
- Language: TypeScript
- Homepage:
- Size: 211 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Welcome to @totigm/discord-bot 👋
## 📄 Introduction
This is a library to create Discord bots. It is a Discord implementation of the [@totigm/bot-builder](https://www.npmjs.com/package/@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](https://v12.discordjs.guide) library is being used.
## 🔗 Quick links
- [Reference documentation](./docs/reference.md)
- [Options](#⚙️-options)
- [Set up a discord bot](https://v12.discordjs.guide/preparations/setting-up-a-bot-application.html)
- [Discord.js v12 docs](https://v12.discordjs.guide)
- [Bot builder](https://www.npmjs.com/package/@totigm/bot-builder)
- [WhatsApp bot](https://www.npmjs.com/package/@totigm/whatsapp-bot)
- [GitHub](https://github.com/totigm/discord-bot#readme)
- [NPM](https://www.npmjs.com/package/@totigm/discord-bot)## 💻 Installation
```sh
npm i @totigm/discord-bot
```or
```sh
yarn add @totigm/discord-bot
```## 🚀 Getting started
Check [this tutorial](https://v12.discordjs.guide/preparations/setting-up-a-bot-application.html) on how to create a discord bot.
Start adding commands to your bot by checking the [reference documentation](./docs/reference.md).
## 🤖 Example usage
```ts
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](https://user-images.githubusercontent.com/64804554/185551989-2beacc0e-8026-47fa-8f12-2820ef412a86.png)
## ⚙️ Options
When you create a bot, you can pass an options object to customize it. Check its [options](./docs/options.md) documentation for more information.
```ts
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](./docs/CONTRIBUTING.md).
## ⭐️ Show your support
Give a ⭐️ if this project helped you!
## 📝 License
Copyright © 2022 [Toti Muñoz](https://github.com/totigm).
This project is [MIT](https://github.com/totigm/discord-bot/blob/master/LICENSE) licensed.---
This project was made with ❤ and TypeScript