parent
9c65a4956e
commit
94d4c3ac72
|
@ -19,6 +19,7 @@ func New(token, prefix string, db *database.Database) (*discordgo.Session, error
|
|||
}
|
||||
bot.Identify.Intents = discordgo.IntentsAllWithoutPrivileged
|
||||
|
||||
bot.AddHandler(Ready)
|
||||
bot.AddHandler(CommandHandler(prefix, db))
|
||||
bot.AddHandler(MessageHandler(prefix, db))
|
||||
|
||||
|
@ -86,3 +87,10 @@ func MessageHandler(prefix string, db *database.Database) func(session *discordg
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func Ready(session *discordgo.Session, ready *discordgo.Ready) {
|
||||
beaver.Infof("https://discord.com/api/oauth2/authorize?client_id=%s&permissions=0&redirect_uri=https://stone.land&scope=bot", ready.User.ID)
|
||||
if err := session.UpdateGameStatus(0, "with ROCKS"); err != nil {
|
||||
beaver.Errorf("could not update status: %v", err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue