public async Task Consume(ConsumeContext <SetLocalQuotesRequest> context)
        {
            var request = context.Message;
            await _guildSettingsService.SetUsingLocalQuotes(request.GuildId, request.UsingLocal);

            await context.RespondAsync(new HandlerResponse(HandlerResponseCode.Success));
        }
Пример #2
0
        public async Task LocalQuotes()
        {
            var guild = ((IGuildChannel)Context.Channel).Guild;
            await _guildSettingsService.SetUsingLocalQuotes(guild.Id, true);

            await Context.Interaction.ModifyOriginalResponseAsync(properties =>
            {
                properties.AllowedMentions = AllowedMentions.None;
                properties.Embed           = new EmbedBuilder()
                                             .WithTitle("Quotes are local")
                                             .WithDescription($"Got it! Your quotes are now channel-based")
                                             .WithColor(Color.Blue)
                                             .WithCurrentTimestamp()
                                             .Build();
            });
        }