Compare commits
No commits in common. "v5" and "5.1.20" have entirely different histories.
8 changed files with 18 additions and 16 deletions
|
@ -1,4 +1,5 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
#nullable disable
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using EllieBot.Db.Models;
|
||||
|
||||
namespace EllieBot.Db;
|
||||
|
@ -16,8 +17,6 @@ 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();
|
||||
}
|
|
@ -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}!*\n";
|
||||
msg += $"*+{N(Config.BoostBonus.BaseTimelyBonus)} bonus for boosting {userInfo.guild}!*";
|
||||
|
||||
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.002m;
|
||||
private const decimal RESET_TOTAL_MULTIPLIER = 0.02m;
|
||||
|
||||
private readonly DbService _db;
|
||||
private readonly ICurrencyService _cs;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#nullable disable
|
||||
using LinqToDB;
|
||||
using LinqToDB.Data;
|
||||
using LinqToDB.EntityFrameworkCore;
|
||||
|
@ -52,7 +53,8 @@ public sealed class BlacklistService : IExecOnMessage, IReadyExecutor
|
|||
|
||||
private ValueTask OnReload(BlacklistEntry[] newBlacklist)
|
||||
{
|
||||
newBlacklist ??= [];
|
||||
if (newBlacklist is null)
|
||||
return default;
|
||||
|
||||
blacklistedGuilds =
|
||||
new HashSet<ulong>(newBlacklist.Where(x => x.Type == BlacklistType.Server).Select(x => x.ItemId))
|
||||
|
@ -67,9 +69,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 (guild is not null && blacklistedGuilds.Contains(guild.Id))
|
||||
if (blacklistedGuilds.Contains(guild.Id))
|
||||
{
|
||||
Log.Information("Blocked input from blacklisted guild: {GuildName} [{GuildId}]",
|
||||
guild.Name,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Text.RegularExpressions;
|
||||
#nullable disable
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace EllieBot.Common.TypeReaders.Models;
|
||||
|
||||
|
@ -8,8 +9,8 @@ public class StoopidTime
|
|||
@"^(?:(?<months>\d)mo)?(?:(?<weeks>\d{1,2})w)?(?:(?<days>\d{1,2})d)?(?:(?<hours>\d{1,4})h)?(?:(?<minutes>\d{1,5})m)?(?:(?<seconds>\d{1,6})s)?$",
|
||||
RegexOptions.Compiled | RegexOptions.Multiline);
|
||||
|
||||
public string Input { get; set; } = string.Empty;
|
||||
public TimeSpan Time { get; set; } = default;
|
||||
public string Input { get; set; }
|
||||
public TimeSpan Time { get; set; }
|
||||
|
||||
private StoopidTime() { }
|
||||
|
||||
|
@ -52,8 +53,8 @@ public class StoopidTime
|
|||
};
|
||||
}
|
||||
|
||||
public static implicit operator TimeSpan?(StoopidTime? st)
|
||||
=> st?.Time;
|
||||
public static implicit operator TimeSpan(StoopidTime st)
|
||||
=> st.Time;
|
||||
|
||||
public static implicit operator StoopidTime(TimeSpan ts)
|
||||
=> new()
|
||||
|
|
|
@ -1517,7 +1517,7 @@ take:
|
|||
betroll:
|
||||
desc: |-
|
||||
Bets the specified amount of currency and rolls a dice.
|
||||
Rolling over 65 yields x2 of your currency, over 90 - x4 and 100 x10.
|
||||
Rolling over 66 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