예제 #1
0
        public async ValueTask CheckAsync(IDiscordMessage data, IMutableContext e, Func <ValueTask> next)
        {
            Log.Debug($"Starting command aggregation with query '{e.GetQuery()}'");

            var command = map.GetCommand(e.GetArgumentPack().Pack);

            if (command == null)
            {
                Log.Warning($"No command was found with query '{string.Join(" ", e.GetQuery())}'");
                return;
            }

            if (command is IExecutable exec)
            {
                e.SetExecutable(exec);
                await next();
            }
        }