Skip to content

Commit

Permalink
Merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
denverquane committed Dec 2, 2020
1 parent de0d63c commit bbb00f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions discord/command_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,19 +328,18 @@ func (bot *Bot) HandleCommand(isAdmin, isPermissioned bool, sett *storage.GuildS
} else {
userID, err := extractUserIDFromMention(args[1])
if userID == "" || err != nil {
if strings.ReplaceAll(strings.ToLower(args[1]), "\"", "") == "guild" {
arg := strings.ReplaceAll(strings.ToLower(args[1]), "\"", "")
if arg == "guild" || arg == "server" {
_, err := s.ChannelMessageSendEmbed(m.ChannelID, bot.GuildStatsEmbed(m.GuildID, sett, premStatus))
if err != nil {
log.Println(err)
}
} else {
s.ChannelMessageSend(m.ChannelID, "I didn't recognize that user, or you mistyped 'guild'...")
}

} else {
s.ChannelMessageSendEmbed(m.ChannelID, bot.UserStatsEmbed(userID, m.GuildID, sett, premStatus))
}

}
break
case command.Premium:
Expand All @@ -350,14 +349,16 @@ func (bot *Bot) HandleCommand(isAdmin, isPermissioned bool, sett *storage.GuildS
} else {
arg := strings.ToLower(args[1])
if isAdmin {
if arg == "invite" || arg == "inv" {
if arg == "invite" || arg == "invites" || arg == "inv" {
_, err := s.ChannelMessageSendEmbed(m.ChannelID, premiumInvitesEmbed(premStatus, sett))
if err != nil {
log.Println(err)
}
} else {
s.ChannelMessageSend(m.ChannelID, "Sorry, I didn't recognize that premium command or argument!")
}
} else {
s.ChannelMessageSend(m.ChannelID, "Viewing the premium invites is an Admin command")
s.ChannelMessageSend(m.ChannelID, "Viewing the premium invites is an Admin-only command")
}
}
break
Expand Down
Empty file removed discord/commands.go
Empty file.

0 comments on commit bbb00f2

Please sign in to comment.