mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-08 06:47:56 +00:00
implement proxied message and permcheck commands
This commit is contained in:
parent
2b304457cc
commit
e4f38c76a9
19 changed files with 233 additions and 155 deletions
|
|
@ -100,6 +100,22 @@ public static class ContextParametersExt
|
|||
);
|
||||
}
|
||||
|
||||
public static async Task<Myriad.Types.Message.Reference?> ParamResolveMessage(this Context ctx, string param_name)
|
||||
{
|
||||
return await ctx.Parameters.ResolveParameter(
|
||||
ctx, param_name,
|
||||
param => (param as Parameter.MessageRef)?.message
|
||||
);
|
||||
}
|
||||
|
||||
public static async Task<Myriad.Types.Channel?> ParamResolveChannel(this Context ctx, string param_name)
|
||||
{
|
||||
return await ctx.Parameters.ResolveParameter(
|
||||
ctx, param_name,
|
||||
param => (param as Parameter.ChannelRef)?.channel
|
||||
);
|
||||
}
|
||||
|
||||
public static async Task<Myriad.Types.Guild?> ParamResolveGuild(this Context ctx, string param_name)
|
||||
{
|
||||
return await ctx.Parameters.ResolveParameter(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue