Skip to content

Commit

Permalink
Fix index out of range panics
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanGuigou committed Nov 23, 2024
1 parent 7dae69f commit bee7d9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go-is-gud/super.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (s *Super) messageCreate(dg *discordgo.Session, m *discordgo.MessageCreate)
switch command {
case ".disable":
{
if len(contents) < 1 {
if len(contents) < 2 {
return
}
command := strings.TrimSpace(contents[1])
Expand All @@ -75,7 +75,7 @@ func (s *Super) messageCreate(dg *discordgo.Session, m *discordgo.MessageCreate)
}
case ".user":
{
if len(contents) < 1 {
if len(contents) < 2 {
return
}
uid := contents[1]
Expand Down

0 comments on commit bee7d9a

Please sign in to comment.