Compare commits
6 commits
Author | SHA1 | Date | |
---|---|---|---|
4af3a9086f | |||
2d806119b4 | |||
f68ff81dce | |||
3e5bccd215 | |||
e851c01c91 | |||
b81de1f103 |
7 changed files with 11 additions and 12 deletions
|
@ -7,7 +7,7 @@ public static class MigrationQueries
|
|||
{
|
||||
public static void UpdateUsernames(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql("UPDATE DiscordUser SET Username = '??' + Username WHERE Discriminator = '????';");
|
||||
migrationBuilder.Sql("UPDATE DiscordUser SET Username = '??' || Username WHERE Discriminator = '????';");
|
||||
}
|
||||
|
||||
public static void MigrateRero(MigrationBuilder migrationBuilder)
|
||||
|
|
|
@ -265,7 +265,7 @@ public partial class Gambling : GamblingModule<GamblingService>
|
|||
{
|
||||
msg += "\n\n";
|
||||
if (booster)
|
||||
msg += $"*+{N(Config.BoostBonus.BaseTimelyBonus)} bonus for boosting {userInfo.guild}!*";
|
||||
msg += $"*+{N(Config.BoostBonus.BaseTimelyBonus)} bonus for boosting {userInfo.guild}!*\n";
|
||||
|
||||
if (percentBonus > float.Epsilon)
|
||||
msg +=
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace EllieBot.Modules.Gambling.Services;
|
|||
public sealed class UserBetStatsService : IEService
|
||||
{
|
||||
private const long RESET_MIN_PRICE = 1000;
|
||||
private const decimal RESET_TOTAL_MULTIPLIER = 0.02m;
|
||||
private const decimal RESET_TOTAL_MULTIPLIER = 0.002m;
|
||||
|
||||
private readonly DbService _db;
|
||||
private readonly ICurrencyService _cs;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#nullable disable
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using EllieBot.Db.Models;
|
||||
|
||||
namespace EllieBot.Db;
|
||||
|
@ -17,6 +16,8 @@ public static class SelfAssignableRolesExtensions
|
|||
return true;
|
||||
}
|
||||
|
||||
public static IReadOnlyCollection<SelfAssignedRole> GetFromGuild(this DbSet<SelfAssignedRole> roles, ulong guildId)
|
||||
public static IReadOnlyCollection<SelfAssignedRole> GetFromGuild(
|
||||
this DbSet<SelfAssignedRole> roles,
|
||||
ulong guildId)
|
||||
=> roles.AsQueryable().Where(s => s.GuildId == guildId).ToArray();
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
#nullable disable
|
||||
using LinqToDB;
|
||||
using LinqToDB.Data;
|
||||
using LinqToDB.EntityFrameworkCore;
|
||||
|
@ -53,8 +52,7 @@ public sealed class BlacklistService : IExecOnMessage, IReadyExecutor
|
|||
|
||||
private ValueTask OnReload(BlacklistEntry[] newBlacklist)
|
||||
{
|
||||
if (newBlacklist is null)
|
||||
return default;
|
||||
newBlacklist ??= [];
|
||||
|
||||
blacklistedGuilds =
|
||||
new HashSet<ulong>(newBlacklist.Where(x => x.Type == BlacklistType.Server).Select(x => x.ItemId))
|
||||
|
@ -69,9 +67,9 @@ public sealed class BlacklistService : IExecOnMessage, IReadyExecutor
|
|||
return default;
|
||||
}
|
||||
|
||||
public Task<bool> ExecOnMessageAsync(IGuild guild, IUserMessage usrMsg)
|
||||
public Task<bool> ExecOnMessageAsync(IGuild? guild, IUserMessage usrMsg)
|
||||
{
|
||||
if (blacklistedGuilds.Contains(guild.Id))
|
||||
if (guild is not null && blacklistedGuilds.Contains(guild.Id))
|
||||
{
|
||||
Log.Information("Blocked input from blacklisted guild: {GuildName} [{GuildId}]",
|
||||
guild.Name,
|
||||
|
|
|
@ -1517,7 +1517,7 @@ take:
|
|||
betroll:
|
||||
desc: |-
|
||||
Bets the specified amount of currency and rolls a dice.
|
||||
Rolling over 66 yields x2 of your currency, over 90 - x4 and 100 x10.
|
||||
Rolling over 65 yields x2 of your currency, over 90 - x4 and 100 x10.
|
||||
You can specify 'all', 'half' or 'X%' instead of the amount to bet that part of your current balance.
|
||||
ex:
|
||||
- 5
|
||||
|
|
Loading…
Reference in a new issue