don't let the bot starts if any of the readys fails
This commit is contained in:
parent
3f26f9f8f5
commit
6ef732a1f0
6 changed files with 9 additions and 7 deletions
src/EllieBot
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
}
|
|
@ -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; }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue