mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
fix: fixed .iam
fix: fixed .sclr not being respected on many different commands change: .rps now also has the amount bet
This commit is contained in:
@@ -21,7 +21,7 @@ public partial class Administration
|
||||
{
|
||||
var guildUser = (IGuildUser)ctx.User;
|
||||
|
||||
var group = await _service.GetRoleGroup(ctx.User.Id, role.Id);
|
||||
var group = await _service.GetRoleGroup(ctx.Guild.Id, role.Id);
|
||||
|
||||
IUserMessage msg = null;
|
||||
try
|
||||
@@ -90,7 +90,7 @@ public partial class Administration
|
||||
return;
|
||||
}
|
||||
|
||||
var group = await _service.GetRoleGroup(role.Guild.Id, role.Id);
|
||||
var group = await _service.GetRoleGroup(ctx.Guild.Id, role.Id);
|
||||
|
||||
if (group is null || group.Roles.All(x => x.RoleId != role.Id))
|
||||
{
|
||||
|
@@ -390,7 +390,7 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
[Priority(0)]
|
||||
public Task CurrencyTransactions([Leftover] IUser usr)
|
||||
=> InternalCurrencyTransactions(usr.Id, 1);
|
||||
|
||||
|
||||
[Cmd]
|
||||
[OwnerOnly]
|
||||
[Priority(-1)]
|
||||
@@ -872,9 +872,6 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
}
|
||||
else if (result.Result == RpsResultType.Win)
|
||||
{
|
||||
if ((long)result.Won > 0)
|
||||
embed.AddField(GetText(strs.won), N((long)result.Won));
|
||||
|
||||
msg = GetText(strs.rps_win(ctx.User.Mention,
|
||||
GetRpsPick(pick),
|
||||
GetRpsPick((InputRpsPick)result.ComputerPick)));
|
||||
@@ -890,6 +887,13 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
.WithOkColor()
|
||||
.WithDescription(msg);
|
||||
|
||||
if (amount > 0)
|
||||
{
|
||||
embed
|
||||
.AddField(GetText(strs.bet), N(amount), true)
|
||||
.AddField(GetText(strs.won), $"{N((long)result.Won)}", true);
|
||||
}
|
||||
|
||||
await Response().Embed(embed).SendAsync();
|
||||
}
|
||||
|
||||
|
@@ -14,7 +14,7 @@ public partial class Utility
|
||||
}
|
||||
|
||||
private string GetCommandString(NadekoCommandCallModel res)
|
||||
=> $"{_bcs.Data.Prefix}{res.Name} {res.Arguments.Select((x, i) => GetParamString(x, i + 1 == res.Arguments.Count)).Join(" ")}";
|
||||
=> $"{prefix}{res.Name} {res.Arguments.Select((x, i) => GetParamString(x, i + 1 == res.Arguments.Count)).Join(" ")}";
|
||||
|
||||
private static string GetParamString(string val, bool isLast)
|
||||
=> isLast ? val : "\"" + val + "\"";
|
||||
|
Reference in New Issue
Block a user