Add Command Functionality to Discord Package & Implement Feedback Webhooks (!3)

Co-authored-by: Layla <layla@layla.gg>
Reviewed-on: https://gitea.sumulayla.synology.me/layla/birdbot/pulls/3
This commit is contained in:
2023-06-15 21:25:46 -04:00
parent 204803cd0b
commit 7b0c8351a8
10 changed files with 324 additions and 20 deletions

View File

@ -46,6 +46,9 @@ func (app *Bot) Initialize(cfg *core.Config) error {
if app.guildID == "" {
return fmt.Errorf("discord Guild ID is not set")
}
if cfg.Discord.ApplicationID == "" {
return fmt.Errorf("discord Application ID is not set")
}
if cfg.Mastodon.ClientID != "" && cfg.Mastodon.ClientSecret != "" &&
cfg.Mastodon.Username != "" && cfg.Mastodon.Password != "" &&
@ -54,7 +57,7 @@ func (app *Bot) Initialize(cfg *core.Config) error {
cfg.Mastodon.Username, cfg.Mastodon.Password)
}
app.Session = discord.New(app.guildID, cfg.Discord.Token)
app.Session = discord.New(cfg.Discord.ApplicationID, app.guildID, cfg.Discord.Token)
// Register Event Handlers
app.Session.OnReady(app.onReady)