tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
ChatChannel.cs
Go to the documentation of this file.
1using System.ComponentModel.DataAnnotations;
2using System.Globalization;
3
6
8{
10 public sealed class ChatChannel : ChatChannelBase
11 {
15 public long Id { get; set; }
16
20 public long ChatSettingsId { get; set; }
21
25 [StringLength(Limits.MaximumIndexableStringLength, MinimumLength = 1)]
26 public string? IrcChannel { get; set; }
27
31 public ulong? DiscordChannelId { get; set; }
32
36 public ChatBot? ChatSettings { get; set; }
37
43 public Api.Models.ChatChannel ToApi(ChatProvider chatProvider) => new()
44 {
45 ChannelData = chatProvider == ChatProvider.Discord ? DiscordChannelId!.Value.ToString(CultureInfo.InvariantCulture) : IrcChannel,
50 Tag = Tag,
51 };
52 }
53}
bool? IsUpdatesChannel
If the ChatChannel is an updates channel.
string? Tag
A custom tag users can define to group channels together.
bool? IsSystemChannel
If the ChatChannel received system messages.
bool? IsWatchdogChannel
If the ChatChannel is a watchdog channel.
bool? IsAdminChannel
If the ChatChannel is an admin channel.
Sanity limits to prevent users from overloading.
Definition Limits.cs:9
const int MaximumIndexableStringLength
Length limit for NamedEntity.Names.
Definition Limits.cs:23
ulong? DiscordChannelId
The Discord channel snowflake.
string? IrcChannel
The IRC channel name.
Api.Models.ChatChannel ToApi(ChatProvider chatProvider)
Convert to a Api.Models.ChatChannel.
ChatProvider
Represents a chat service provider.