Time to bring these from my personal branch #33

Manually merged
toastie_t0ast merged 57 commits from :v6 into v6 2025-02-28 23:18:40 +00:00
6 changed files with 9 additions and 7 deletions
Showing only changes of commit 6ef732a1f0 - Show all commits

View file

@ -309,6 +309,8 @@ public sealed class Bot : IBot
"Failed running OnReadyAsync method on {Type} type: {Message}",
toExec.GetType().Name,
ex.Message);
Environment.Exit(9);
}
});

View file

@ -8,7 +8,7 @@ public class FilterChannelId
[Key]
public int Id { get; set; }
public int GuildFilterConfigId { get; set; }
public int? GuildFilterConfigId { get; set; }
public ulong ChannelId { get; set; }

View file

@ -3,7 +3,7 @@ namespace EllieBot.Db.Models;
public class FilterLinksChannelId : DbEntity
{
public ulong ChannelId { get; set; }
public int GuildFilterConfigId { get; set; }
public int? GuildFilterConfigId { get; set; }
protected bool Equals(FilterLinksChannelId other)
=> ChannelId == other.ChannelId;

View file

@ -3,7 +3,7 @@ namespace EllieBot.Db.Models;
public class FilterWordsChannelId : DbEntity
{
public int GuildFilterConfigId { get; set; }
public int? GuildFilterConfigId { get; set; }
public ulong ChannelId { get; set; }
protected bool Equals(FilterWordsChannelId other)

View file

@ -2,10 +2,10 @@ namespace EllieBot.Db.Models;
public class FilteredWord : DbEntity
{
public int GuildFilterConfigId { get; set; }
public string Word { get; set; } = string.Empty;
public int? GuildFilterConfigId { get; set; }
public string? Word { get; set; }
public override bool Equals(object? obj) => obj is FilteredWord fw && fw.Word == Word;
public override int GetHashCode() => Word.GetHashCode();
}

View file

@ -2,7 +2,7 @@
public class ExcludedItem : DbEntity
{
public int XpSettingsId { get; set; }
public int? XpSettingsId { get; set; }
public ulong ItemId { get; set; }
public ExcludedItemType ItemType { get; set; }