mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(bot): clean up / paginate help command
This commit is contained in:
parent
f3c02a4254
commit
f0b5749d5c
5 changed files with 159 additions and 61 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue