Ejemplo n.º 1
0
    public async Task <Result <FeedbackMessage> > GrantConsentAsync()
    {
        var grantResult = await _privacy.GrantUserConsentAsync(_context.User.ID);

        return(grantResult.IsSuccess
            ? new FeedbackMessage("Thank you! Enjoy using the bot :smiley:", _feedback.Theme.Secondary)
            : Result <FeedbackMessage> .FromError(grantResult));
    }
Ejemplo n.º 2
0
        public async Task <RuntimeResult> GrantConsentAsync()
        {
            var grantResult = await _privacy.GrantUserConsentAsync(this.Context.User);

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

            return(RuntimeCommandResult.FromSuccess("Thank you! Enjoy using the bot :smiley:"));
        }
Ejemplo n.º 3
0
        public async Task GrantConsentAsync()
        {
            await _privacy.GrantUserConsentAsync(this.Context.User);

            await _feedback.SendConfirmationAsync(this.Context, "Thank you! Enjoy using the bot :smiley:");
        }