Skip to content

Commit

Permalink
use reply
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada committed Aug 21, 2024
1 parent c418f83 commit 7123336
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/commands/roll/roll.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/pajbot/basecommand"
"github.com/pajbot/pajbot2-discord/pkg"
"github.com/pajbot/pajbot2-discord/pkg/commands"
"github.com/pajbot/pajbot2-discord/pkg/utils"
)

var _ pkg.Command = &Command{}
Expand All @@ -34,10 +35,8 @@ func (c *Command) Run(s *discordgo.Session, m *discordgo.MessageCreate, parts []
number, err := strconv.Atoi(parts[1])
if err == nil && number >= 1 {
v := 1 + rand.Intn(number)
response := discordgo.MessageSend{
Content: fmt.Sprintf("%s, %d", m.Author.Mention(), v),
}
s.ChannelMessageSendComplex(m.ChannelID, &response)
response := fmt.Sprintf("%d", v)
utils.Reply(s, m, response)
}
}
return pkg.CommandResultUserCooldown
Expand Down

0 comments on commit 7123336

Please sign in to comment.