Esempio n. 1
0
        public async Task HideAsync([Remainder] string command)
        {
            var context = new ShadeContext(Context.Me, Context.Message, Context.Client, Context.Services);

            context.SetAnswerType(AnswerType.None);

            var result = await CommandService.ExecuteAsync(context, command, Context.Services);

            _ = CommandHandlingService.HandleCommandResult(context, result);
        }
Esempio n. 2
0
        public async Task ExecuteAsync(IUser user, [Remainder] string command)
        {
            var fakeContext = new ShadeContext(Context.Me, Context.Message, Context.Client, Context.Services);

            fakeContext.OverrideUser(user);
            fakeContext.OverridePermissionsUser(Context.User as IGuildUser);

            var result = await CommandHandlingService.CommandService.ExecuteAsync(fakeContext, command, Services);

            await Context.Message.AddReactionAsync(new Emoji("\u2705"));

            _ = CommandHandlingService.HandleCommandResult(fakeContext, result);
        }