예제 #1
0
    public async Task <Result <FeedbackMessage> > DenyAutoroleForUserAsync
    (
        [DiscordTypeHint(TypeHint.Role)] AutoroleConfiguration autorole,
        IUser user
    )
    {
        var denyResult = await _autoroles.DenyAutoroleAsync(autorole, user.ID);

        return(!denyResult.IsSuccess
            ? Result <FeedbackMessage> .FromError(denyResult)
            : new FeedbackMessage("Qualification denied.", _feedback.Theme.Secondary));
    }
        public async Task <RuntimeResult> DenyAutoroleForUserAsync
        (
            AutoroleConfiguration autorole,
            IUser user
        )
        {
            var denyResult = await _autoroles.DenyAutoroleAsync(autorole, user);

            if (!denyResult.IsSuccess)
            {
                return(denyResult.ToRuntimeResult());
            }

            return(RuntimeCommandResult.FromSuccess("Qualification denied."));
        }
예제 #3
0
        public async Task DenyAutoroleForUserAsync
        (
            AutoroleConfiguration autorole,
            IUser user
        )
        {
            var denyResult = await _autoroles.DenyAutoroleAsync(autorole, user);

            if (!denyResult.IsSuccess)
            {
                await _feedback.SendErrorAsync(this.Context, denyResult.ErrorReason);

                return;
            }

            await _feedback.SendConfirmationAsync(this.Context, "Qualification denied.");
        }