Skip to content

Commit

Permalink
fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed May 16, 2022
1 parent 27e5efc commit 96d78fe
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 13 deletions.
2 changes: 0 additions & 2 deletions _examples/application_commands/gateway/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

"github.com/disgoorg/disgo"
"github.com/disgoorg/disgo/bot"
"github.com/disgoorg/disgo/cache"
"github.com/disgoorg/disgo/discord"
"github.com/disgoorg/disgo/events"
"github.com/disgoorg/disgo/gateway"
Expand Down Expand Up @@ -47,7 +46,6 @@ func main() {

client, err := disgo.New(token,
bot.WithGatewayConfigOpts(gateway.WithGatewayIntents(discord.GatewayIntentsNone)),
bot.WithCacheConfigOpts(cache.WithCacheFlags(cache.FlagsDefault)),
bot.WithEventListeners(&events.ListenerAdapter{
OnApplicationCommandInteraction: commandListener,
}),
Expand Down
2 changes: 0 additions & 2 deletions _examples/application_commands/localization/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

"github.com/disgoorg/disgo"
"github.com/disgoorg/disgo/bot"
"github.com/disgoorg/disgo/cache"
"github.com/disgoorg/disgo/discord"
"github.com/disgoorg/disgo/events"
"github.com/disgoorg/disgo/gateway"
Expand Down Expand Up @@ -71,7 +70,6 @@ func main() {

client, err := disgo.New(token,
bot.WithGatewayConfigOpts(gateway.WithGatewayIntents(discord.GatewayIntentsNone)),
bot.WithCacheConfigOpts(cache.WithCacheFlags(cache.FlagsDefault)),
bot.WithEventListeners(&events.ListenerAdapter{
OnApplicationCommandInteraction: commandListener,
}),
Expand Down
1 change: 0 additions & 1 deletion _examples/guild_scheduled_events/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func main() {
),
bot.WithCacheConfigOpts(
cache.WithCacheFlags(cache.FlagsAll),
cache.WithMemberCachePolicy(cache.MemberCachePolicyAll),
),
bot.WithMemberChunkingFilter(bot.MemberChunkingFilterNone),
bot.WithEventListeners(&events.ListenerAdapter{
Expand Down
1 change: 0 additions & 1 deletion _examples/test/examplebot.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func main() {
),
bot.WithCacheConfigOpts(
cache.WithCacheFlags(cache.FlagsAll),
cache.WithMemberCachePolicy(cache.MemberCachePolicyAll),
),
bot.WithMemberChunkingFilter(bot.MemberChunkingFilterNone),
bot.WithEventListeners(listener),
Expand Down
8 changes: 1 addition & 7 deletions _examples/threads/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@ import (
"github.com/disgoorg/disgo"
"github.com/disgoorg/disgo/bot"
"github.com/disgoorg/disgo/cache"
"github.com/disgoorg/snowflake/v2"

"github.com/disgoorg/disgo/discord"
"github.com/disgoorg/disgo/events"
"github.com/disgoorg/disgo/gateway"
"github.com/disgoorg/log"
)

var (
token = os.Getenv("token")
guildID = snowflake.GetEnv("guild_id")
)
var token = os.Getenv("token")

func main() {
log.SetFlags(log.LstdFlags | log.Lshortfile)
Expand All @@ -34,7 +29,6 @@ func main() {
),
bot.WithCacheConfigOpts(
cache.WithCacheFlags(cache.FlagsAll),
cache.WithMemberCachePolicy(cache.MemberCachePolicyAll),
),
bot.WithMemberChunkingFilter(bot.MemberChunkingFilterAll),
bot.WithEventListeners(&events.ListenerAdapter{
Expand Down

0 comments on commit 96d78fe

Please sign in to comment.