Skip to content

Commit

Permalink
fix: メンバーをチャンクするように
Browse files Browse the repository at this point in the history
  • Loading branch information
ikafly144 committed May 15, 2023
1 parent bbab3dc commit c6820eb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bot/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ func (b *Bot[DB]) SetupBot(listeners ...bot.EventListener) {
var err error
b.Client, err = disgo.New(b.Config.Token,
bot.WithLogger(b.Logger),
bot.WithGatewayConfigOpts(gateway.WithIntents(gateway.IntentsAll), gateway.WithAutoReconnect(true)),
bot.WithGatewayConfigOpts(gateway.WithIntents(gateway.IntentsAll), gateway.WithAutoReconnect(true), gateway.WithLogger(b.Logger)),
bot.WithCacheConfigOpts(cache.WithCaches(cache.FlagsAll)),
bot.WithShardManagerConfigOpts(sharding.WithAutoScaling(true), sharding.WithGatewayConfigOpts(gateway.WithIntents(gateway.IntentsAll), gateway.WithAutoReconnect(true))),
bot.WithEventManagerConfigOpts(bot.WithAsyncEventsEnabled(), bot.WithListeners(b.Paginator), bot.WithListeners(listeners...)),
bot.WithShardManagerConfigOpts(sharding.WithAutoScaling(true), sharding.WithGatewayConfigOpts(gateway.WithIntents(gateway.IntentsAll), gateway.WithAutoReconnect(true), gateway.WithLogger(b.Logger))),
bot.WithMemberChunkingFilter(bot.MemberChunkingFilterAll),
bot.WithEventManagerConfigOpts(bot.WithAsyncEventsEnabled(), bot.WithListeners(b.Paginator), bot.WithListeners(listeners...), bot.WithEventManagerLogger(b.Logger)),
)
if err != nil {
b.Logger.Fatalf("botのセットアップに失敗 %s", err)
Expand Down

0 comments on commit c6820eb

Please sign in to comment.