Решил через discordgo.Ready. У меня сработало.
func main() {
dg, err := discordgo.New("Bot " + Token)
if err != nil {
fmt.Println("error creating Discord session,", err)
return
}
dg.AddHandler(setActivity)
dg.Identify.Intents = discordgo.IntentsGuildMessages
err = dg.Open()
if err != nil {
fmt.Println("error opening connection,", err)
return
}
sc := make(chan os.Signal, 1)
signal.Notify(sc, syscall.SIGINT, syscall.SIGTERM, os.Interrupt, os.Kill)
<-sc
dg.Close()
}
func setActivity(s *discordgo.Session, r *discordgo.Ready) {
err := s.UpdateListeningStatus("Пропишите b!games;")
if err != nil {
panic(err)
}
}