mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
feat(commands): add cs codegen to statically use params and flags in bot code, remove Any
This commit is contained in:
parent
0c012e98b5
commit
07e8a4851a
20 changed files with 297 additions and 417 deletions
|
|
@ -159,7 +159,19 @@ public class MessageCreated: IEventHandler<MessageCreateEvent>
|
|||
}
|
||||
|
||||
var ctx = new Context(_services, shardId, guild, channel, evt, cmdStart, system, config, guildConfig, _config.Prefixes ?? BotConfig.DefaultPrefixes, parameters);
|
||||
await _tree.ExecuteCommand(ctx);
|
||||
|
||||
Commands command;
|
||||
try
|
||||
{
|
||||
command = await Commands.FromContext(ctx);
|
||||
}
|
||||
catch (PKError e)
|
||||
{
|
||||
await ctx.Reply($"{Emojis.Error} {e.Message}");
|
||||
throw;
|
||||
}
|
||||
|
||||
await _tree.ExecuteCommand(ctx, command);
|
||||
}
|
||||
catch (PKError)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue