fix: loop logic
This commit is contained in:
parent
2eac1b12e4
commit
f43237083f
1 changed files with 2 additions and 1 deletions
|
@ -110,10 +110,11 @@ func (d *DiscommandStruct) ChatInputRun(name string, s *discordgo.Session, i *di
|
||||||
func (d *DiscommandStruct) ComponentRun(s *discordgo.Session, i *discordgo.InteractionCreate) {
|
func (d *DiscommandStruct) ComponentRun(s *discordgo.Session, i *discordgo.InteractionCreate) {
|
||||||
for _, c := range d.Components {
|
for _, c := range d.Components {
|
||||||
if (!c.Parse(&ComponentContext{s, i, c})) {
|
if (!c.Parse(&ComponentContext{s, i, c})) {
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
c.Run(&ComponentContext{s, i, c})
|
c.Run(&ComponentContext{s, i, c})
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue