From 75d0eb631deaed0ff602840b5149ed7b4422b262 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 25 Nov 2024 06:08:04 +0000 Subject: [PATCH] change: gambling commands now show amount bet. Slightly changed the layout. Updated some gambling strings add: added .btr excl --- CHANGELOG.md | 1 + .../Db/Models/{GroupName.cs => SarGroup.cs} | 0 src/NadekoBot/Db/Models/btnrole/ButtonRole.cs | 2 + ...26033634_btnroles_guildcolors.Designer.cs} | 8 +- ...=> 20241126033634_btnroles_guildcolors.cs} | 5 +- .../PostgreSqlContextModelSnapshot.cs | 4 + ...26033626_btnroles_guildcolors.Designer.cs} | 7 +- ...=> 20241126033626_btnroles_guildcolors.cs} | 5 +- .../NadekoSqliteContextModelSnapshot.cs | 3 + .../Role/ButtonRolesCommands.cs | 31 ++++++- .../Administration/Role/ButtonRolesService.cs | 80 +++++++++++++------ .../Modules/Gambling/Draw/DrawCommands.cs | 17 ++-- .../Gambling/FlipCoin/FlipCoinCommands.cs | 30 ++++--- src/NadekoBot/Modules/Gambling/Gambling.cs | 10 ++- .../Modules/Gambling/Slot/SlotCommands.cs | 11 +-- src/NadekoBot/data/aliases.yml | 22 ++--- .../data/strings/commands/commands.en-US.yml | 15 +++- .../strings/responses/responses.en-US.json | 11 ++- .../strings/responses/responses.ts-TS.json | 2 +- 19 files changed, 184 insertions(+), 80 deletions(-) rename src/NadekoBot/Db/Models/{GroupName.cs => SarGroup.cs} (100%) rename src/NadekoBot/Migrations/PostgreSql/{20241119135917_guildcolors.Designer.cs => 20241126033634_btnroles_guildcolors.Designer.cs} (99%) rename src/NadekoBot/Migrations/PostgreSql/{20241119135917_guildcolors.cs => 20241126033634_btnroles_guildcolors.cs} (94%) rename src/NadekoBot/Migrations/Sqlite/{20241119135908_guildcolors.Designer.cs => 20241126033626_btnroles_guildcolors.Designer.cs} (99%) rename src/NadekoBot/Migrations/Sqlite/{20241119135908_guildcolors.cs => 20241126033626_btnroles_guildcolors.cs} (94%) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7e7185c6..6b9667c26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except da - `.btr list` to list all button roles on the server - `.btr rm` to remove a button role from the specified message - `.btr rma` to remove all button roles on the specified message + - `.btr excl` to toggle exclusive button roles (only 1 role per message or any number) - Use `.h` on any of the above for more info - Added `.wrongsong` which will delete the last queued song. - Useful in case you made a mistake, or the bot queued a wrong song diff --git a/src/NadekoBot/Db/Models/GroupName.cs b/src/NadekoBot/Db/Models/SarGroup.cs similarity index 100% rename from src/NadekoBot/Db/Models/GroupName.cs rename to src/NadekoBot/Db/Models/SarGroup.cs diff --git a/src/NadekoBot/Db/Models/btnrole/ButtonRole.cs b/src/NadekoBot/Db/Models/btnrole/ButtonRole.cs index 977c607d9..222fbb55e 100644 --- a/src/NadekoBot/Db/Models/btnrole/ButtonRole.cs +++ b/src/NadekoBot/Db/Models/btnrole/ButtonRole.cs @@ -22,4 +22,6 @@ public sealed class ButtonRole [MaxLength(50)] public string Label { get; set; } = string.Empty; + + public bool Exclusive { get; set; } } \ No newline at end of file diff --git a/src/NadekoBot/Migrations/PostgreSql/20241119135917_guildcolors.Designer.cs b/src/NadekoBot/Migrations/PostgreSql/20241126033634_btnroles_guildcolors.Designer.cs similarity index 99% rename from src/NadekoBot/Migrations/PostgreSql/20241119135917_guildcolors.Designer.cs rename to src/NadekoBot/Migrations/PostgreSql/20241126033634_btnroles_guildcolors.Designer.cs index 22eb877f8..0f35338f7 100644 --- a/src/NadekoBot/Migrations/PostgreSql/20241119135917_guildcolors.Designer.cs +++ b/src/NadekoBot/Migrations/PostgreSql/20241126033634_btnroles_guildcolors.Designer.cs @@ -12,8 +12,8 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace NadekoBot.Migrations.PostgreSql { [DbContext(typeof(PostgreSqlContext))] - [Migration("20241119135917_guildcolors")] - partial class guildcolors + [Migration("20241126033634_btnroles_guildcolors")] + partial class btnroles_guildcolors { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -479,6 +479,10 @@ namespace NadekoBot.Migrations.PostgreSql .HasColumnType("character varying(100)") .HasColumnName("emote"); + b.Property("Exclusive") + .HasColumnType("boolean") + .HasColumnName("exclusive"); + b.Property("GuildId") .HasColumnType("numeric(20,0)") .HasColumnName("guildid"); diff --git a/src/NadekoBot/Migrations/PostgreSql/20241119135917_guildcolors.cs b/src/NadekoBot/Migrations/PostgreSql/20241126033634_btnroles_guildcolors.cs similarity index 94% rename from src/NadekoBot/Migrations/PostgreSql/20241119135917_guildcolors.cs rename to src/NadekoBot/Migrations/PostgreSql/20241126033634_btnroles_guildcolors.cs index 5f6a0d67c..532788480 100644 --- a/src/NadekoBot/Migrations/PostgreSql/20241119135917_guildcolors.cs +++ b/src/NadekoBot/Migrations/PostgreSql/20241126033634_btnroles_guildcolors.cs @@ -6,7 +6,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace NadekoBot.Migrations.PostgreSql { /// - public partial class guildcolors : Migration + public partial class btnroles_guildcolors : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) @@ -24,7 +24,8 @@ namespace NadekoBot.Migrations.PostgreSql position = table.Column(type: "integer", nullable: false), roleid = table.Column(type: "numeric(20,0)", nullable: false), emote = table.Column(type: "character varying(100)", maxLength: 100, nullable: false), - label = table.Column(type: "character varying(50)", maxLength: 50, nullable: false) + label = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), + exclusive = table.Column(type: "boolean", nullable: false) }, constraints: table => { diff --git a/src/NadekoBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs b/src/NadekoBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs index 0d36e617a..f8917e309 100644 --- a/src/NadekoBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs +++ b/src/NadekoBot/Migrations/PostgreSql/PostgreSqlContextModelSnapshot.cs @@ -476,6 +476,10 @@ namespace NadekoBot.Migrations.PostgreSql .HasColumnType("character varying(100)") .HasColumnName("emote"); + b.Property("Exclusive") + .HasColumnType("boolean") + .HasColumnName("exclusive"); + b.Property("GuildId") .HasColumnType("numeric(20,0)") .HasColumnName("guildid"); diff --git a/src/NadekoBot/Migrations/Sqlite/20241119135908_guildcolors.Designer.cs b/src/NadekoBot/Migrations/Sqlite/20241126033626_btnroles_guildcolors.Designer.cs similarity index 99% rename from src/NadekoBot/Migrations/Sqlite/20241119135908_guildcolors.Designer.cs rename to src/NadekoBot/Migrations/Sqlite/20241126033626_btnroles_guildcolors.Designer.cs index fc589101c..87f2436c2 100644 --- a/src/NadekoBot/Migrations/Sqlite/20241119135908_guildcolors.Designer.cs +++ b/src/NadekoBot/Migrations/Sqlite/20241126033626_btnroles_guildcolors.Designer.cs @@ -11,8 +11,8 @@ using NadekoBot.Db; namespace NadekoBot.Migrations { [DbContext(typeof(SqliteContext))] - [Migration("20241119135908_guildcolors")] - partial class guildcolors + [Migration("20241126033626_btnroles_guildcolors")] + partial class btnroles_guildcolors { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -357,6 +357,9 @@ namespace NadekoBot.Migrations .HasMaxLength(100) .HasColumnType("TEXT"); + b.Property("Exclusive") + .HasColumnType("INTEGER"); + b.Property("GuildId") .HasColumnType("INTEGER"); diff --git a/src/NadekoBot/Migrations/Sqlite/20241119135908_guildcolors.cs b/src/NadekoBot/Migrations/Sqlite/20241126033626_btnroles_guildcolors.cs similarity index 94% rename from src/NadekoBot/Migrations/Sqlite/20241119135908_guildcolors.cs rename to src/NadekoBot/Migrations/Sqlite/20241126033626_btnroles_guildcolors.cs index dbb8761cf..30e499cb8 100644 --- a/src/NadekoBot/Migrations/Sqlite/20241119135908_guildcolors.cs +++ b/src/NadekoBot/Migrations/Sqlite/20241126033626_btnroles_guildcolors.cs @@ -5,7 +5,7 @@ namespace NadekoBot.Migrations { /// - public partial class guildcolors : Migration + public partial class btnroles_guildcolors : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) @@ -23,7 +23,8 @@ namespace NadekoBot.Migrations Position = table.Column(type: "INTEGER", nullable: false), RoleId = table.Column(type: "INTEGER", nullable: false), Emote = table.Column(type: "TEXT", maxLength: 100, nullable: false), - Label = table.Column(type: "TEXT", maxLength: 50, nullable: false) + Label = table.Column(type: "TEXT", maxLength: 50, nullable: false), + Exclusive = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { diff --git a/src/NadekoBot/Migrations/Sqlite/NadekoSqliteContextModelSnapshot.cs b/src/NadekoBot/Migrations/Sqlite/NadekoSqliteContextModelSnapshot.cs index 9d615665c..7a00600ca 100644 --- a/src/NadekoBot/Migrations/Sqlite/NadekoSqliteContextModelSnapshot.cs +++ b/src/NadekoBot/Migrations/Sqlite/NadekoSqliteContextModelSnapshot.cs @@ -354,6 +354,9 @@ namespace NadekoBot.Migrations .HasMaxLength(100) .HasColumnType("TEXT"); + b.Property("Exclusive") + .HasColumnType("INTEGER"); + b.Property("GuildId") .HasColumnType("INTEGER"); diff --git a/src/NadekoBot/Modules/Administration/Role/ButtonRolesCommands.cs b/src/NadekoBot/Modules/Administration/Role/ButtonRolesCommands.cs index dd0c5edbe..c793238cc 100644 --- a/src/NadekoBot/Modules/Administration/Role/ButtonRolesCommands.cs +++ b/src/NadekoBot/Modules/Administration/Role/ButtonRolesCommands.cs @@ -1,4 +1,5 @@ -using NadekoBot.Db.Models; +using NadekoBot.Common.TypeReaders.Models; +using NadekoBot.Db.Models; using NadekoBot.Modules.Administration.Services; using System.Text; using ContextType = Discord.Commands.ContextType; @@ -7,6 +8,7 @@ namespace NadekoBot.Modules.Administration; public partial class Administration { + [Group("btr")] public partial class ButtonRoleCommands : NadekoModule { private List GetActionRows(IReadOnlyList roles) @@ -228,7 +230,7 @@ public partial class Administration { eb.WithPendingColor() .WithDescription(GetText(strs.btnrole_none)); - + return eb; } @@ -265,5 +267,30 @@ public partial class Administration }) .SendAsync(); } + + [Cmd] + [RequireContext(ContextType.Guild)] + [BotPerm(GuildPerm.ManageRoles)] + [RequireUserPermission(GuildPerm.ManageRoles)] + public Task BtnRoleExclusive(MessageLink link, PermissionAction exclusive) + => BtnRoleExclusive(link.Message.Id, exclusive); + + [Cmd] + [RequireContext(ContextType.Guild)] + [BotPerm(GuildPerm.ManageRoles)] + [RequireUserPermission(GuildPerm.ManageRoles)] + public async Task BtnRoleExclusive(ulong messageId, PermissionAction exclusive) + { + var res = await _service.SetExclusiveButtonRoles(ctx.Guild.Id, messageId, exclusive.Value); + + if (res) + { + await Response().Confirm(strs.btnrole_exclusive).SendAsync(); + } + else + { + await Response().Confirm(strs.btnrole_multiple).SendAsync(); + } + } } } \ No newline at end of file diff --git a/src/NadekoBot/Modules/Administration/Role/ButtonRolesService.cs b/src/NadekoBot/Modules/Administration/Role/ButtonRolesService.cs index 07adc267a..3514a393a 100644 --- a/src/NadekoBot/Modules/Administration/Role/ButtonRolesService.cs +++ b/src/NadekoBot/Modules/Administration/Role/ButtonRolesService.cs @@ -42,32 +42,49 @@ public sealed class ButtonRolesService : INService, IReadyExecutor _ = Task.Run(async () => { - await using var uow = _db.GetDbContext(); - var buttonRole = await uow.GetTable() - .Where(x => x.ButtonId == smc.Data.CustomId && x.MessageId == smc.Message.Id) - .FirstOrDefaultAsyncLinqToDB(); - - if (buttonRole is null) - return; - - var guild = _client.GetGuild(buttonRole.GuildId); - if (guild is null) - return; - - var role = guild.GetRole(buttonRole.RoleId); - if (role is null) - return; - - if (smc.User is not IGuildUser user) - return; - - if (user.GetRoles().Any(x => x.Id == role.Id)) + try { - await user.RemoveRoleAsync(role.Id); - return; - } + await using var uow = _db.GetDbContext(); + var buttonRole = await uow.GetTable() + .Where(x => x.ButtonId == smc.Data.CustomId && x.MessageId == smc.Message.Id) + .FirstOrDefaultAsyncLinqToDB(); - await user.AddRoleAsync(role.Id); + if (buttonRole is null) + return; + + var guild = _client.GetGuild(buttonRole.GuildId); + if (guild is null) + return; + + var role = guild.GetRole(buttonRole.RoleId); + if (role is null) + return; + + if (smc.User is not IGuildUser user) + return; + + if (user.GetRoles().Any(x => x.Id == role.Id)) + { + await user.RemoveRoleAsync(role.Id); + return; + } + + if (buttonRole.Exclusive) + { + var otherRoles = await uow.GetTable() + .Where(x => x.GuildId == smc.GuildId && x.MessageId == smc.Message.Id) + .Select(x => x.RoleId) + .ToListAsyncLinqToDB(); + + await user.RemoveRolesAsync(otherRoles); + } + + await user.AddRoleAsync(role.Id); + } + catch (Exception ex) + { + Log.Warning(ex, "Unable to handle button role interaction for user {UserId}", inter.User.Id); + } }); } @@ -108,7 +125,8 @@ public sealed class ButtonRolesService : INService, IReadyExecutor : 1, Emote = emoteStr, Label = string.Empty, - ButtonId = $"{BTN_PREFIX}:{guildId}:{guid}" + ButtonId = $"{BTN_PREFIX}:{guildId}:{guid}", + Exclusive = (uow.GetTable().Where(x => x.GuildId == guildId && x.MessageId == messageId).All(x => x.Exclusive)) }, _ => new() { @@ -151,4 +169,16 @@ public sealed class ButtonRolesService : INService, IReadyExecutor .OrderBy(x => x.Id) .ToListAsyncLinqToDB(); } + + public async Task SetExclusiveButtonRoles(ulong guildId, ulong messageId, bool exclusive) + { + await using var uow = _db.GetDbContext(); + return await uow.GetTable() + .Where(x => x.GuildId == guildId && x.MessageId == messageId) + .UpdateAsync((_) => new() + { + Exclusive = exclusive + }) + > 0; + } } \ No newline at end of file diff --git a/src/NadekoBot/Modules/Gambling/Draw/DrawCommands.cs b/src/NadekoBot/Modules/Gambling/Draw/DrawCommands.cs index 4b685c68e..2621cf08f 100644 --- a/src/NadekoBot/Modules/Gambling/Draw/DrawCommands.cs +++ b/src/NadekoBot/Modules/Gambling/Draw/DrawCommands.cs @@ -57,7 +57,7 @@ public partial class Gambling i.Dispose(); var eb = CreateEmbed() - .WithOkColor(); + .WithOkColor(); var toSend = string.Empty; if (cardObjects.Count == 5) @@ -172,13 +172,14 @@ public partial class Gambling } var eb = CreateEmbed() - .WithOkColor() - .WithAuthor(ctx.User) - .WithDescription(result.Card.GetEmoji()) - .AddField(GetText(strs.guess), GetGuessInfo(val, col), true) - .AddField(GetText(strs.card), GetCardInfo(result.Card), true) - .AddField(GetText(strs.won), N((long)result.Won), false) - .WithImageUrl("attachment://card.png"); + .WithOkColor() + .WithAuthor(ctx.User) + .WithDescription(result.Card.GetEmoji()) + .AddField(GetText(strs.guess), GetGuessInfo(val, col), true) + .AddField(GetText(strs.card), GetCardInfo(result.Card), false) + .AddField(GetText(strs.bet), N(amount), true) + .AddField(GetText(strs.won), N((long)result.Won), true) + .WithImageUrl("attachment://card.png"); using var img = await GetCardImageAsync(result.Card); await using var imgStream = await img.ToStreamAsync(); diff --git a/src/NadekoBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs b/src/NadekoBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs index 37afa69f8..2ffe6c66b 100644 --- a/src/NadekoBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs +++ b/src/NadekoBot/Modules/Gambling/FlipCoin/FlipCoinCommands.cs @@ -56,7 +56,7 @@ public partial class Gambling var tailsArr = await _images.GetTailsImageAsync(); var result = await _service.FlipAsync(count); - + for (var i = 0; i < result.Length; i++) { if (result[i].Side == 0) @@ -77,18 +77,18 @@ public partial class Gambling i.Dispose(); var imgName = $"coins.{format.FileExtensions.First()}"; - + var msg = count != 1 ? Format.Bold(GetText(strs.flip_results(count, headCount, tailCount))) : GetText(strs.flipped(headCount > 0 ? Format.Bold(GetText(strs.heads)) : Format.Bold(GetText(strs.tails)))); - + var eb = CreateEmbed() - .WithOkColor() - .WithAuthor(ctx.User) - .WithDescription(msg) - .WithImageUrl($"attachment://{imgName}"); + .WithOkColor() + .WithAuthor(ctx.User) + .WithDescription(msg) + .WithImageUrl($"attachment://{imgName}"); await ctx.Channel.SendFileAsync(stream, imgName, @@ -123,18 +123,22 @@ public partial class Gambling var won = (long)result.Won; if (won > 0) { - str = Format.Bold(GetText(strs.flip_guess(N(won)))); + str = Format.Bold(GetText(strs.betflip_guess)); } else { str = Format.Bold(GetText(strs.better_luck)); } - await Response().Embed(CreateEmbed() - .WithAuthor(ctx.User) - .WithDescription(str) - .WithOkColor() - .WithImageUrl(imageToSend.ToString())).SendAsync(); + await Response() + .Embed(CreateEmbed() + .WithAuthor(ctx.User) + .WithDescription(str) + .AddField(GetText(strs.bet), N(amount), true) + .AddField(GetText(strs.won), N((long)result.Won), true) + .WithOkColor() + .WithImageUrl(imageToSend.ToString())) + .SendAsync(); } } } \ No newline at end of file diff --git a/src/NadekoBot/Modules/Gambling/Gambling.cs b/src/NadekoBot/Modules/Gambling/Gambling.cs index 9dc6306d3..6514d2e9b 100644 --- a/src/NadekoBot/Modules/Gambling/Gambling.cs +++ b/src/NadekoBot/Modules/Gambling/Gambling.cs @@ -718,7 +718,7 @@ public partial class Gambling : GamblingModule string str; if (win > 0) { - str = GetText(strs.br_win(N(win), result.Threshold + (result.Roll == 100 ? " 👑" : ""))); + str = GetText(strs.betroll_win(result.Threshold + (result.Roll == 100 ? " 👑" : ""))); } else { @@ -728,7 +728,9 @@ public partial class Gambling : GamblingModule var eb = CreateEmbed() .WithAuthor(ctx.User) .WithDescription(Format.Bold(str)) - .AddField(GetText(strs.roll2), result.Roll.ToString(CultureInfo.InvariantCulture)) + .AddField(GetText(strs.roll2), result.Roll.ToString(CultureInfo.InvariantCulture), true) + .AddField(GetText(strs.bet), N(amount), true) + .AddField(GetText(strs.won), N((long)result.Won), true) .WithOkColor(); await Response().Embed(eb).SendAsync(); @@ -922,8 +924,8 @@ public partial class Gambling : GamblingModule var eb = CreateEmbed() .WithOkColor() .WithDescription(sb.ToString()) - .AddField(GetText(strs.multiplier), $"{result.Multiplier:0.##}x", true) - .AddField(GetText(strs.won), $"{(long)result.Won}", true) + .AddField(GetText(strs.bet), N(amount), true) + .AddField(GetText(strs.won), $"{N((long)result.Won)}", true) .WithAuthor(ctx.User); diff --git a/src/NadekoBot/Modules/Gambling/Slot/SlotCommands.cs b/src/NadekoBot/Modules/Gambling/Slot/SlotCommands.cs index 0e256d49c..134a2db2a 100644 --- a/src/NadekoBot/Modules/Gambling/Slot/SlotCommands.cs +++ b/src/NadekoBot/Modules/Gambling/Slot/SlotCommands.cs @@ -66,10 +66,10 @@ public partial class Gambling var eb = CreateEmbed() - .WithAuthor(ctx.User) - .WithDescription(Format.Bold(text)) - .WithImageUrl($"attachment://result.png") - .WithOkColor(); + .WithAuthor(ctx.User) + .WithDescription(Format.Bold(text)) + .WithImageUrl($"attachment://result.png") + .WithOkColor(); var bb = new ButtonBuilder(emote: Emoji.Parse("🔁"), customId: "slot:again", label: "Pull Again"); var inter = _inter.Create(ctx.User.Id, @@ -168,7 +168,8 @@ public partial class Gambling await using (var uow = _db.GetDbContext()) { ownedAmount = uow.Set() - .FirstOrDefault(x => x.UserId == ctx.User.Id)?.CurrencyAmount + .FirstOrDefault(x => x.UserId == ctx.User.Id) + ?.CurrencyAmount ?? 0; } diff --git a/src/NadekoBot/data/aliases.yml b/src/NadekoBot/data/aliases.yml index eef8f8733..5e15ebe27 100644 --- a/src/NadekoBot/data/aliases.yml +++ b/src/NadekoBot/data/aliases.yml @@ -1499,18 +1499,22 @@ snipe: - snipe - sn btnroleadd: - - btnradd - - btnra + - add + - a btnroleremove: - - btnrrem - - btnrr - - btnrrm + - rem + - r + - rm btnroleremoveall: - - btnrremall - - btnrra + - removeall + - rma btnrolelist: - - btnrlist - - btnrl + - list + - l + - ls +btnroleexclusive: + - excl + - e wrongsong: - wrongsong - wrongtrack diff --git a/src/NadekoBot/data/strings/commands/commands.en-US.yml b/src/NadekoBot/data/strings/commands/commands.en-US.yml index 2b863cb93..c8fe62fde 100644 --- a/src/NadekoBot/data/strings/commands/commands.en-US.yml +++ b/src/NadekoBot/data/strings/commands/commands.en-US.yml @@ -4769,6 +4769,19 @@ btnrolelist: - '' params: - { } +btnroleexclusive: + desc: |- + Toggles whether button roles are exclusive or not. + If enabled, users can only pick one role from the buttons per message. + If disabled, users can pick any number of roles. + ex: + - '123123123 enable' + - '123123123 disable' + params: + - message: + desc: "A message link or id of the message" + enable: + desc: "Whether to enable or disable exclusive button roles" wrongsong: desc: |- Removes the last queued song. @@ -4807,4 +4820,4 @@ servercolorpending: - '#ffff00' params: - color: - desc: "The hex of the color to set" \ No newline at end of file + desc: "The hex of the color to set" diff --git a/src/NadekoBot/data/strings/responses/responses.en-US.json b/src/NadekoBot/data/strings/responses/responses.en-US.json index 88c78f105..c627928e3 100644 --- a/src/NadekoBot/data/strings/responses/responses.en-US.json +++ b/src/NadekoBot/data/strings/responses/responses.en-US.json @@ -238,10 +238,10 @@ "sb_user": "User soft-banned", "awarded": "{2} has awarded {0} to {1}", "better_luck": "Better luck next time ^_^", - "br_win": "Congratulations! You won {0} for rolling above {1}", + "betroll_win": "Congratulations! You rolled above {0}", "deck_reshuffled": "Deck reshuffled.", "flipped": "Flipped {0}", - "flip_guess": "You guessed it! You won {0}", + "betflip_guess": "You guessed it!", "flip_invalid": "Invalid number specified. You can flip 1 to {0} coins.", "flip_results": "Flipped {0} coins. {1} heads, {2} tails.", "cards_left": "{0} cards left in the deck.", @@ -266,7 +266,8 @@ "available_tests": "Available Tests", "test_results_for": "Test results for {0}", "won": "Won", - "multiplier": "Multiplier", + "bet": "Bet", + "multi": "Multi", "tails": "Tail", "take": "successfully took {0} from {1}", "take_fail": "was unable to take {0} from {1} because the user doesn't have that much {2}!", @@ -1129,8 +1130,10 @@ "btnrole_none": "There are no button roles on this page.", "btnrole_removeall_not_found": "Button role successfully removed but message wasn't found.", "btnrole_removed": "Button role removed.", + "btnrole_exclusive": "Users can now pick only one of the roles from that message.", + "btnrole_multiple": "Users can now pick any number of button roles from that message.", "no_last_queued_found": "No last queued track found.", "wrongsong_success": "Oops! Wrong song removed: {0}", "server_not_found": "Server not found.", - "server_color_set": "Successfully set a new server color.", + "server_color_set": "Successfully set a new server color." } diff --git a/src/NadekoBot/data/strings/responses/responses.ts-TS.json b/src/NadekoBot/data/strings/responses/responses.ts-TS.json index b695468b2..34b8b1622 100644 --- a/src/NadekoBot/data/strings/responses/responses.ts-TS.json +++ b/src/NadekoBot/data/strings/responses/responses.ts-TS.json @@ -300,7 +300,7 @@ "hangman_running": "Hangman game already running on this channel.", "hangman_start_errored": "Starting hangman errored.", "hangman_types": "List of \u0022{0}hangman\u0022 term types:", - "picked": "picked {0}", + "picked": "{0} picked {1}", "planted": "{0} planted {1}", "trivia_already_running": "Trivia game is already running on this server.", "trivia_game": "Trivia Game",