An open API service indexing awesome lists of open source software.

https://github.com/ascriver/robles-bot

A Discord bot built with Discord.js and Node.
https://github.com/ascriver/robles-bot

discord discord-bot discord-js discord-music-bot discordbot discordjs

Last synced: about 2 months ago
JSON representation

A Discord bot built with Discord.js and Node.

Awesome Lists containing this project

README

          

# Robles-Bot

> Robles-Bot is a discord chat bot built using [Discord.js](https://discord.js.org/#/) and node.

This is a bot that I created to mess around with my friends in our Discord server. Robles-Bot can do anything from play music from a YouTube link in your chat channel, to calling a phone and talking with text to speech. I will be adding more commands once I have more free time, but feel free to branch and contribute your own as well!

## Codebase Overview

Robles-Bot is a Node.js application built on Discord.js.
The entry point (`server.js`) loads environment variables and discovers command modules under `commands/`.
It listens for Discord events and dispatches interactions to the appropriate handler.
A companion script (`deploy-commands.js`) registers these commands with Discord's API.

Each morning the bot can also post top headlines from configurable RSS feeds into a chosen channel.

Commands are organized into category folders, each exporting a `SlashCommandBuilder` definition and an async `execute` function. Database settings live in `config/config.json`, and `package.json` provides scripts for running the bot or executing tests.

To explore further, learn about Discord.js fundamentals, command deployment strategies, environment management with dotenv, persistence through Sequelize, and Node.js async patterns.

## Commands

- /ping - Replies with Pong!
- /roll - Rolls a dice with optional sides and count.

## Installation

```
git clone git@github.com:AScriver/robles-bot.git
cd robles-bot
npm install
cp .env.example .env
```

[How do I setup a bot account and invite it to my server?](https://discordpy.readthedocs.io/en/rewrite/discord.html)

Update `.env` with your `DISCORD_TOKEN`, `CLIENT_ID`, `OWNER_ID`, and `GUILD_ID`.
For daily news updates, also set `NEWS_CHANNEL_ID` to the target channel and `NEWS_SOURCES` to a comma-separated list of RSS feed URLs.

## Help

If you need help with anything, feel free to [join my Discord](https://discord.gg/Bm7mnzh) server and ask questions

## Contributing

1. Fork it ()
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request

## License

The MIT License (MIT)

Copyright (c) 2018 Austin Scriver

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.