Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theovidal/onyxcord
π€π Go library to easily build Discord bots
https://github.com/theovidal/onyxcord
discord discord-bot-framework discordgo
Last synced: about 1 month ago
JSON representation
π€π Go library to easily build Discord bots
- Host: GitHub
- URL: https://github.com/theovidal/onyxcord
- Owner: theovidal
- License: mit
- Created: 2020-08-15T13:16:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-19T20:51:59.000Z (over 3 years ago)
- Last Synced: 2024-06-20T16:32:19.308Z (7 months ago)
- Topics: discord, discord-bot-framework, discordgo
- Language: Go
- Homepage:
- Size: 213 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
onyxcord
Discord bots with Go as straightforward as possible.
Documentation β Discord server β License**β This is only a prototype and for a personal use. Don't plan to make huge bots with this library.**
## π§ Setup
Get the dependency from the source:
```bash
go get -u github.com/theovidal/onyxcord
```In your code, create the bot instance:
```go
bot := onyxcord.RegisterBot("MyBot", true)
```You can then register commands:
```go
pingCommand := *onyxcord.Command{
// ...
}
bot.RegisterCommand("ping", &pingCommand)
```Specify the intents of your bot, so it can receive proper events:
```go
bot.Client.Identify.Intents = discordgo.MakeIntent(discordgo.IntentsGuildMessages | discordgo.IntentsDirectMessages)
```Finally, connect it to Discord with the `Run` method! See more on the [documentation](https://pkg.go.dev/github.com/theovidal/onyxcord) of the library.
## π» Development
TODO
## π Credits
- Library: [discordgo](https://github.com/bwmarrin/discordgo)
- Maintainer: [ThΓ©o Vidal](https://github.com/theovidal)## π License
[GNU GPL v3](./LICENSE)