Add check for given guild ID

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-08-27 20:41:05 +02:00
parent 7b5e20911b
commit 5495e33c3e
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -118,6 +118,12 @@ func main() {
defer discord.Close()
log.Debug("Discord connected")
guild, err := discord.Guild(config.GuildID)
if err != nil {
log.WithError(err).Fatal("Unable to get guild for given guild-id in config")
}
log.WithField("name", guild.Name).Info("Found specified guild for operation")
// Run Crontab
crontab.Start()
defer crontab.Stop()