tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
KekCommand.cs
Go to the documentation of this file.
1using System.Threading;
2using System.Threading.Tasks;
3
5
7{
11 sealed class KekCommand : ICommand
12 {
16 const string Kek = "kek";
17
19 public string Name => Kek;
20
22 public string HelpText => Kek;
23
25 public bool AdminOnly => false;
26
28 public ValueTask<MessageContent> Invoke(string arguments, ChatUser user, CancellationToken cancellationToken) => ValueTask.FromResult(new MessageContent
29 {
30 Text = Kek,
31 });
32 }
33}
Represents a tgs_chat_user datum.
Definition ChatUser.cs:12
string Name
The text to invoke the command. May not be "?" or "help" (case-insensitive).
Definition KekCommand.cs:19
ValueTask< MessageContent > Invoke(string arguments, ChatUser user, CancellationToken cancellationToken)
Invoke the ICommand.A ValueTask<TResult> resulting in a MessageContent to send to the invoker.
bool AdminOnly
If the command should only be available to ChatUsers who's ChatUser.Channel has ChannelRepresentation...
Definition KekCommand.cs:25
string HelpText
The help text to display when queires are made about the command.
Definition KekCommand.cs:22
Represents a message to send to a chat provider.
Represents a command that can be invoked by talking to chat bots.
Definition ICommand.cs:12