mirror of
https://github.com/Luzifer/discord-community.git
synced 2024-12-20 02:11:23 +00:00
Add check for given guild ID
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
7b5e20911b
commit
5495e33c3e
1 changed files with 6 additions and 0 deletions
6
main.go
6
main.go
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue