2023-05-15 15:17:34 +00:00
|
|
|
using ApplicationCommandType = Myriad.Types.ApplicationCommand.ApplicationCommandType;
|
|
|
|
|
using InteractionType = Myriad.Types.Interaction.InteractionType;
|
|
|
|
|
|
|
|
|
|
namespace PluralKit.Bot;
|
|
|
|
|
|
|
|
|
|
public partial class ApplicationCommandTree
|
|
|
|
|
{
|
|
|
|
|
public Task TryHandleCommand(InteractionContext ctx)
|
|
|
|
|
{
|
|
|
|
|
if (ctx.Event.Data!.Name == ProxiedMessageQuery.Name)
|
|
|
|
|
return ctx.Execute<ApplicationCommandProxiedMessage>(ProxiedMessageQuery, m => m.QueryMessage(ctx));
|
|
|
|
|
else if (ctx.Event.Data!.Name == ProxiedMessageDelete.Name)
|
|
|
|
|
return ctx.Execute<ApplicationCommandProxiedMessage>(ProxiedMessageDelete, m => m.DeleteMessage(ctx));
|
|
|
|
|
else if (ctx.Event.Data!.Name == ProxiedMessagePing.Name)
|
2024-11-05 21:29:57 -07:00
|
|
|
return ctx.Execute<ApplicationCommandProxiedMessage>(ProxiedMessagePing, m => m.PingMessageAuthor(ctx));
|
2023-05-15 15:17:34 +00:00
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|