Compare commits

..

6 commits
5.1.20 ... v5

7 changed files with 11 additions and 12 deletions

View file

@ -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)

View file

@ -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 +=

View file

@ -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;

View file

@ -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();
}

View file

@ -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,

View file

@ -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