Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        


onyxcord

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)