https://github.com/kisshan13/discog
A framework to build discord bot using offical discord go bindings .
https://github.com/kisshan13/discog
bot-framework discord discord-bot-framework discord-go golang
Last synced: 4 months ago
JSON representation
A framework to build discord bot using offical discord go bindings .
- Host: GitHub
- URL: https://github.com/kisshan13/discog
- Owner: kisshan13
- License: other
- Created: 2024-10-01T18:37:53.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-10-18T08:58:34.000Z (7 months ago)
- Last Synced: 2024-11-13T11:27:28.813Z (6 months ago)
- Topics: bot-framework, discord, discord-bot-framework, discord-go, golang
- Language: Go
- Homepage: https://discog.kisshan.xyz
- Size: 23.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Discog
Discog is a [Go](https://golang.org/) package and a discord bot library which uses [Discordgo](https://github.com/bwmarrin/discordgo) to interact with Discord API.
Discog provides a boilerplate less way to build discord bot. It has following features :
* Command manager
* Interaction Manager
* Handlers**For help with this package or general Go discussion, please join the [Discog Discord Server](https://discord.gg/golang) chat server.**
## Getting Started
### Installing
Discog uses **Discordgo** so it's important to upto date with **Discordgo** version for **Discog** which is `v0.28.1`
`go get` *will always pull the latest tagged release from the master branch.*
```sh
go get github.com/kisshan13/discog
```### Usage
Import the package into your project.
```go
package mainimport (
"log""github.com/bwmarrin/discordgo"
discog "github.com/kisshan13/discog"
commands "command"
)func main() {
manager := commands.GetManager()
bot, err := discog.NewBot("", manager)if err != nil {
panic(err)
}bot.OnReady(func(r *discordgo.Ready) {
log.Printf("Bot has connected to Discord as %s (%s)\n", r.User.Username, r.User.ID)
})bot.Run(func(session *discordgo.Session, err error) {
if err != nil {
panic(err)
}
log.Println("Bot is running")
})
}```
For more information & documentation please visit examples [repo](https://github.com/kisshan13/discog-examples) .