public async Task SetAsync([Summary("The new prefix."), Remainder] string prefix = null) { if (string.IsNullOrWhiteSpace(prefix)) { var interaction = await _inter.SendSelectionAsync(new ButtonSelectionBuilder <string>() .AddUser(Context.User) .WithSelectionPage(new PageBuilder() .WithTitle("⚠️ Warning ⚠️") .WithDescription($"My current prefix is {_db.GetPrefix(Context.Guild.Id).Prefix}`. Did you intend to reset it?") .WithCurrentTimestamp() .WithColor(_rand.RandomColor() )) .WithInputType(InputType.Buttons) .WithOptions(new[] { new ButtonOption <string>("Confirm", ButtonStyle.Primary), new ButtonOption <string>("Cancel", ButtonStyle.Danger) }) .Build(), Context.Channel, timeout : TimeSpan.FromSeconds(10)); if (interaction.IsSuccess && interaction.Value.Option == "Confirm") { _db.RemovePrefix(Context.Guild.Id); await ReplyAsync("The prefix has been reset to default; mention me if you are unsure of what that is."); } await interaction.Message.DeleteAsync(); return; } var gp = new GuildPrefix { GuildId = Context.Guild.Id, Prefix = prefix }; _db.RemovePrefix(Context.Guild.Id); var suc = _db.AddItem <GuildPrefix>("prefixes", gp); if (suc) { await ReplyAsync($"Changed the prefix to `{prefix}`."); } else { await ReplyAsync("Failed to change the prefix."); } }