Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
github.com/nextep-community/gocord
Gocord is a Go library forked from DisGo, that is a Discord API wrapper written in Go.
Why fork?: This project was created for internal use within the bot Digo, which was developed by Nextep to study and enhance the team's knowledge of Go. For this reason, we wanted maximum control and to ensure the library is updated as quickly as possible with the latest Discord changes. However, we didn’t want to start from scratch.
The public API of Gocord 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 Gocord should be increased and with that breaking changes between non-major versions should be held to a minimum.
Documentation is wip and can be found under
GitHub Wiki is currently under construction. We appreciate help here.
$ go get github.com/nextep-community/gocord
Build a bot client to interact with the Discord API
package main
import (
"context"
"os"
"os/signal"
"syscall"
"github.com/nextep-community/gocord"
"github.com/nextep-community/gocord/bot"
"github.com/nextep-community/gocord/events"
"github.com/nextep-community/gocord/gateway"
)
func main() {
client, err := gocord.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
}
gocord uses slog for logging.
You can find examples here
There is also a bot template with commands & db here
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
Is a Lavalink-Client which can be used to communicate with Lavalink to play/search tracks
TODO
TODO
We would like to thank the DisGo team and community.
See LICENSE for more information.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.