diff --git a/cron/handler.go b/cron/handler.go index 0fa43d4..bfb98fc 100644 --- a/cron/handler.go +++ b/cron/handler.go @@ -290,7 +290,7 @@ func (h *handler) deleteClosedTWServers() { log.Errorln("deleteClosedTWServers: " + err.Error()) return } - if list == nil || list.Items == nil { + if list == nil || len(list.Items) <= 0 { return } diff --git a/discord/coords_translation.go b/discord/coords_translation.go index 7c99030..7260573 100644 --- a/discord/coords_translation.go +++ b/discord/coords_translation.go @@ -108,7 +108,7 @@ func (s *Session) translateCoords(ctx *commandCtx, m *discordgo.MessageCreate) { }, }, ) - if err != nil || list == nil || list.Items == nil { + if err != nil || list == nil || len(list.Items) <= 0 { return }