fix: fix logged command format
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
61d029fc3b
commit
2c6dcda547
|
@ -145,11 +145,8 @@ func (b *Bot) logCommands(_ *discordgo.Session, i *discordgo.InteractionCreate)
|
||||||
cmdData := i.ApplicationCommandData()
|
cmdData := i.ApplicationCommandData()
|
||||||
cmd := cmdData.Name
|
cmd := cmdData.Name
|
||||||
options := cmdData.Options
|
options := cmdData.Options
|
||||||
for len(options) > 0 {
|
for len(options) > 0 && options[0].Type == discordgo.ApplicationCommandOptionSubCommand {
|
||||||
cmd += " " + options[0].Name
|
cmd += " " + options[0].Name
|
||||||
if options[0].Type != discordgo.ApplicationCommandOptionSubCommand {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
options = options[0].Options
|
options = options[0].Options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user