some cleanup
This commit is contained in:
parent
16ee889aae
commit
1a8de9b9fd
3 changed files with 23 additions and 16 deletions
|
@ -22,17 +22,18 @@ var (
|
|||
|
||||
func main() {
|
||||
log.SetLevel(log.LevelInfo)
|
||||
log.Info("starting joinbot...")
|
||||
log.Info("starting tempbot...")
|
||||
log.Info("disgo version: ", disgo.Version)
|
||||
|
||||
// intents needed GUILD_MESSAGES
|
||||
// permissions: Manage Messages
|
||||
// intent:
|
||||
client, err := disgo.New(token,
|
||||
bot.WithGatewayConfigOpts(
|
||||
gateway.WithIntents(gateway.IntentsAll),
|
||||
gateway.WithIntents(gateway.IntentsNone),
|
||||
),
|
||||
bot.WithCacheConfigOpts(
|
||||
cache.WithCacheFlags(
|
||||
cache.FlagsAll,
|
||||
cache.WithCaches(
|
||||
cache.FlagsNone,
|
||||
),
|
||||
),
|
||||
)
|
||||
|
@ -43,6 +44,10 @@ func main() {
|
|||
|
||||
defer client.Close(context.TODO())
|
||||
|
||||
if err = client.OpenGateway(context.TODO()); err != nil {
|
||||
log.Fatal("error while connecting to gateway: ", err)
|
||||
}
|
||||
|
||||
channels, err := client.Rest().GetGuildChannels(registerGuildID)
|
||||
for _, channel := range channels {
|
||||
switch channel.Name() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue