Skip to content

Commit

Permalink
handle DMs instead of panicking
Browse files Browse the repository at this point in the history
  • Loading branch information
duckfullstop committed Jun 1, 2024
1 parent 60e9280 commit 0d6d0eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ var commandHandlers = map[string]func(s *discordgo.Session, i *discordgo.Interac
content = "🤔 Please provide a team name."
break
}
if i.Interaction.GuildID == "" {
content = "😡 This command can only be used in a server."
break
}
roleID := options[0].Options[0].StringValue()
err := validateUserCanJoinRole(s, i.Interaction.Member.User, i.GuildID, roleID)
if err != nil {
Expand Down

0 comments on commit 0d6d0eb

Please sign in to comment.