fix: AI does make mistakes

revert: build action to main
This commit is contained in:
Sachin 2025-09-29 17:42:57 +05:30
parent b5a2f3b386
commit baa638bad6
3 changed files with 8 additions and 9 deletions

View file

@ -42,9 +42,9 @@ public static class CustomCommandsMenu
(buttons, menu, selected) =>
{
if (selected == null) return;
if (buttons == MenuButtons.Select && selected.Option >= 0 && selected.Option < customCommands.Count)
if (buttons == MenuButtons.Select && menu.Option >= 0 && menu.Option < customCommands.Count)
{
var cmd = customCommands[selected.Option];
var cmd = customCommands[menu.Option];
Helper.TryLogCommandOnDiscord(admin, cmd.Command);
if (cmd.ExecuteOnClient)

View file

@ -41,9 +41,9 @@ public static class ReasonMenu
(buttons, menu, selected) =>
{
if (selected == null) return;
if (buttons == MenuButtons.Select && selected.Option >= 0 && selected.Option < reasons.Count)
if (buttons == MenuButtons.Select && menu.Option >= 0 && menu.Option < reasons.Count)
{
onSelectAction(admin, player, reasons[selected.Option]);
onSelectAction(admin, player, reasons[menu.Option]);
}
},
true,
@ -82,9 +82,9 @@ public static class ReasonMenu
(buttons, menu, selected) =>
{
if (selected == null) return;
if (buttons == MenuButtons.Select && selected.Option >= 0 && selected.Option < reasons.Count)
if (buttons == MenuButtons.Select && menu.Option >= 0 && menu.Option < reasons.Count)
{
onSelectAction(admin, player, reasons[selected.Option]);
onSelectAction(admin, player, reasons[menu.Option]);
}
},
true,