https://github.com/picocode1/discord-bot-template
Easy to use template for a discord bot
https://github.com/picocode1/discord-bot-template
bot discord discord-bot discord-bot-template javascript module nodejs template
Last synced: about 2 months ago
JSON representation
Easy to use template for a discord bot
- Host: GitHub
- URL: https://github.com/picocode1/discord-bot-template
- Owner: picocode1
- Created: 2022-01-31T22:43:20.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-31T23:18:27.000Z (over 4 years ago)
- Last Synced: 2025-12-27T09:25:31.378Z (6 months ago)
- Topics: bot, discord, discord-bot, discord-bot-template, javascript, module, nodejs, template
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Discord bot
Advanced Discord bot with modules.
### Feature list
- [x] Custom error function.
- [x] Auto-updated help command.
- [x] Simple module design.
- [x] Auto-updated discord intents.
- [x] Few basic commands.
- [ ] Slash commands.
- [ ] Buttons.
## Requirements
Packages:
```console
npm i discord.js
```
## Example command module
```js
module.exports.run = async (Discord, command, args, channel, message) => {
console.log(`New message! ${message} ${args}`)
message.channel.send(`Command: "${command}" arguments: "${args}" channel: "${channel}"`);
};
module.exports.help = {
name: __filename.slice(__dirname.length + 1, -3),
description: "Example command",
arguments: "Example argument"
}
```
`help` is an object with the following properties:
* `name`: String (default), this will be automaticly set to the filename.
* `description`: String (required), this will be the description of the command.
* `arguments`: String (optional), this is the example text for arguments.
### Settings
In the file `settings.json` you can define a custom prefix, and color for the bot.
```json
{
"prefix": "!",
"token": "DISCORD_TOKEN_HERE",
"color": "#FF0000"
}
```
## Commands
You can create your own commands super easy and put them in the commmands folder.
The filename will be the command for the bot.
## Contributing
Found a bug or problem? File an issue or submit a pull request with the fix.