continued porting to disgo

This commit is contained in:
2024-04-04 16:35:35 +02:00
parent 9738ab3901
commit b85d9d5294
3 changed files with 34 additions and 32 deletions

18
main.go
View File

@@ -23,8 +23,8 @@ import (
)
var (
app *discord.Application
client bot.Client
app *discord.Application
db *sql.DB
)
@@ -47,13 +47,13 @@ func main() {
),
),
bot.WithEventListenerFunc(ready),
bot.WithEventListenerFunc(applicationCommandInteractionCreate),
bot.WithEventListenerFunc(autocompleteInteractionCreate),
bot.WithEventListenerFunc(componentInteractionCreate),
bot.WithEventListenerFunc(modalSubmitInteractionCreate),
bot.WithEventListenerFunc(messageCreate),
bot.WithEventListenerFunc(messageDelete),
bot.WithEventListenerFunc(guildMemberJoin),
//bot.WithEventListenerFunc(applicationCommandInteractionCreate),
//bot.WithEventListenerFunc(autocompleteInteractionCreate),
//bot.WithEventListenerFunc(componentInteractionCreate),
//bot.WithEventListenerFunc(modalSubmitInteractionCreate),
//bot.WithEventListenerFunc(messageCreate),
//bot.WithEventListenerFunc(messageDelete),
//bot.WithEventListenerFunc(guildMemberJoin),
)
if err != nil {
logrus.Fatal("error creating Discord session,", err)
@@ -66,7 +66,7 @@ func main() {
logrus.Error("error opening connection,", err)
return
}
app, err := client.Rest().GetCurrentApplication()
app, err = client.Rest().GetCurrentApplication()
if err != nil {
logrus.Error(err)
}