Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/disgoorg/bot-template
Easy DisGo Bot Template
https://github.com/disgoorg/bot-template
discord discord-bot disgo golang template
Last synced: about 2 months ago
JSON representation
Easy DisGo Bot Template
- Host: GitHub
- URL: https://github.com/disgoorg/bot-template
- Owner: disgoorg
- Created: 2022-02-14T17:52:59.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-06-05T13:38:12.000Z (7 months ago)
- Last Synced: 2024-06-21T03:16:54.747Z (7 months ago)
- Topics: discord, discord-bot, disgo, golang, template
- Language: Go
- Homepage: https://github.com/disgoorg/disgo
- Size: 75.2 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Go Report][0]][1]
[![Go Version][2]][3]
[![License][4]][5]
[![Docker][6]][7]
[![Test][8]][9]# bot-template
This is a simple bot template for creating a bot which includes a config, application commands, components modals(using [handler](https://github.com/disgoorg/disgo/tree/master/handler) and event listeners.
CLI Flags:
- `--config-path=your-config-path`: Path to the config file.
- `--sync-commands=true`: Synchronize commands with the discord.## Usage
1. Click on the `Use this template` button to create a new repository from this template.
2. Clone the repository to your local machine.
3. Open the project in your favorite IDE.
4. Copy the `config.example.toml` file to `config.toml` and fill in the required fields.
5. Run the bot using `go run .`
6. Invite the bot to your server using the invite link generated by [discord developer portal][10].
7.## Configuration
The configuration file is in TOML format. The format is as follows:
```toml
[log]
# valid levels are "debug", "info", "warn", "error"
level = "info"
# valid formats are "text" and "json"
format = "text"
# whether to add the log source to the log message
add_source = true[bot]
# add guild ids the commands should sync to, leave empty to sync globally
dev_guilds = []
# the bot token
token = "..."
```## License
The bot template is licensed under the [Apache License 2.0][5].
[0]: https://goreportcard.com/badge/github.com/disgoorg/bot-template
[1]: https://goreportcard.com/report/github.com/disgoorg/bot-template[2]: https://img.shields.io/github/go-mod/go-version/disgoorg/bot-template
[3]: https://golang.org/doc/devel/release.html[4]: https://img.shields.io/github/license/disgoorg/bot-template
[5]: LICENSE[6]: https://github.com/disgoorg/bot-template/actions/workflows/docker.yml/badge.svg
[7]: https://github.com/disgoorg/bot-template/actions/workflows/docker.yml[8]: https://github.com/disgoorg/bot-template/actions/workflows/test.yml/badge.svg
[9]: https://github.com/disgoorg/bot-template/actions/workflows/test.yml[10]: https://discord.com/developers/applications