feat(bot): clean up / paginate help command

This commit is contained in:
spiral
2022-06-14 19:05:15 -04:00
parent f3c02a4254
commit f0b5749d5c
5 changed files with 159 additions and 61 deletions

View File

@@ -21,11 +21,14 @@ public class InteractionCreated: IEventHandler<InteractionCreateEvent>
if (evt.Type == Interaction.InteractionType.MessageComponent)
{
var customId = evt.Data?.CustomId;
if (customId != null)
{
var ctx = new InteractionContext(evt, _services);
if (customId == null) return;
var ctx = new InteractionContext(evt, _services);
if (customId.Contains("help-menu"))
await Help.ButtonClick(ctx);
else
await _interactionDispatch.Dispatch(customId, ctx);
}
}
}
}