2using System.Collections.Generic;
13 public ICollection<ChatChannel>?
Channels {
get;
set; }
23 return Provider.Value
switch
25#pragma warning disable CS0618
26 ChatProvider.Discord =>
Channels?.Select(x => (x.DiscordChannelId.HasValue || ulong.TryParse(x.ChannelData, out _)) && x.IrcChannel ==
null).All(x => x) ??
true,
27 ChatProvider.Irc =>
Channels?.Select(x => !x.DiscordChannelId.HasValue && (x.IrcChannel !=
null || x.ChannelData !=
null)).All(x => x) ??
true,
28#pragma warning restore CS0618
29 _ =>
throw new InvalidOperationException(
"Invalid provider type!"),
bool ValidateProviderChannelTypes()
Validates Channels are correct for the ChatBotSettings.Provider.
ICollection< ChatChannel >? Channels
Channels the Discord bot should listen/announce in.
Manage the server chat bots.
ChatProvider? Provider
The ChatProvider used for the connection.