disgoorg/disgo
关于
模块化的 Go Discord API 封装库。
安全与隐私可以做什么
- Full Rest API coverage
- HTTP Interactions
- Application Commands
- Message Components
实测星标增长
- 24小时
- +2
- 7天
- +5
- 15天
- +6
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
DisGo
DisGo is a Discord API wrapper written in Golang aimed to be consistent, modular, customizable and higher level than other Discord API wrappers.
Summary
- Stability
- Features
- Missing Features
- Getting Started
- Documentation
- Examples
- Other interesting Projects to look at
- Other Golang Discord Libraries
- Troubleshooting
- Contributing
- License
Stability
The public API of DisGo is mostly stable at this point in time. Smaller breaking changes can happen before the v1 is released.
After v1 is released breaking changes may only happen if the Discord API requires them. They tend to break their released API versions now and then. In general for every new Discord API version the major version of DisGo should be increased and with that breaking changes between non-major versions should be held to a minimum.
Features
- Full Rest API coverage
- Gateway
- Sharding
- HTTP Interactions
- Application Commands
- Message Components
- Modals
- Stage Instance
- Guild Template
- Sticker
- RateLimit
- Webhook
- OAuth2
- Threads
- Guild Scheduled Event
- Voice
- DAVE (E2EE)
Missing Features
Getting Started
Installing
$ go get github.com/disgoorg/disgo
Building a DisGo Instance
Build a bot client to interact with the Discord API
package main
import (
"context"
"os"
"os/signal"
"syscall"
"github.com/disgoorg/disgo"
"github.com/disgoorg/disgo/bot"
"github.com/disgoorg/disgo/events"
"github.com/disgoorg/disgo/gateway"
)
func main() {
client, err := disgo.New("token",
// set gateway options
bot.WithGatewayConfigOpts(
// set enabled intents
gateway.WithIntents(
gateway.IntentGuilds,
gateway.IntentGuildMessages,
gateway.IntentDirectMessages,
),
),
// add event listeners
bot.WithEventListenerFunc(func(e *events.MessageCreate) {
// event code here
}),
)
if err != nil {
panic(err)
}
// connect to the gateway
if err = client.OpenGateway(context.TODO()); err != nil {
panic(err)
}
s := make(chan os.Signal, 1)
signal.Notify(s, syscall.SIGINT, syscall.SIGTERM)
<-s
}
Full Ping Pong Example
A full Ping Pong example can also be found here
Logging
DisGo uses slog for logging.
Documentation
Documentation is wip and can be found under
GitHub Wiki is currently under construction. We appreciate help here.
Examples
You can find examples here
There is also a bot template with commands & db here
or in these projects:
Libraries for DisGo
- strut is a struct oriented command framework for disgo
Other interesting Projects to look at
Lavalink
Is a standalone audio sending node based on Lavaplayer and JDA-Audio. Which allows for sending audio without it ever reaching any of your shards. Lavalink can be used in combination with DisGolink for music Bots
Being used in production by FredBoat, Dyno, LewdBot, and more.
DisGolink
Is a Lavalink-Client which can be used to communicate with Lavalink to play/search tracks
Other Golang Discord Libraries
Troubleshooting
For help feel free to open an issue or reach out on Discord
Contributing
Contributions are welcomed but for bigger changes we recommend first reaching out via Discord or create an issue to discuss your problems, intentions and ideas.
License
Distributed under the . See LICENSE for more information.
Supported by Jetbrains
探索相关项目
加载中…

