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));
    }
Exemple #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:"));
        }
Exemple #3
0
        public async Task GrantConsentAsync()
        {
            await _privacy.GrantUserConsentAsync(this.Context.User);

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