Beispiel #1
0
        private static void OnChatCommandReceived(object sender, OnChatCommandReceivedArgs e)
        {
            Log.Message($"{e.Command.ChatMessage.DisplayName}: {e.Command.ChatMessage.Message}");

            ToolkitChatCommand chatCommand = ChatCommandController.GetChatCommand(e.Command.CommandText);

            if (chatCommand != null)
            {
                chatCommand.TryExecute(e.Command as ITwitchCommand);
            }
        }
Beispiel #2
0
        private static void OnChatCommandReceived(object sender, OnChatCommandReceivedArgs e)
        {
            if (Current.Game == null)
            {
                return;
            }

            ToolkitChatCommand chatCommand = ChatCommandController.GetChatCommand(e.Command.CommandText);

            if (chatCommand != null)
            {
                chatCommand.TryExecute(e.Command as ITwitchCommand);
            }
        }
Beispiel #3
0
        public static CommandItem FromToolkitCore([NotNull] ToolkitChatCommand command)
        {
            var result = new CommandItem {
                Name = command.LabelCap.RawText ?? command.commandText, Usage = $"!{command.commandText}", DefName = command.defName
            };

            result.PullFromExtension(command);

            if (command.requiresBroadcaster || command.requiresMod)
            {
                result.UserLevel = UserLevels.Moderator;
            }

            result.Data = new CommandData {
                IsShortcut = false, Mod = command.TryGetModName()
            };

            return(result);
        }
Beispiel #4
0
 public PawnHealthCommand(ToolkitChatCommand command) : base(command)
 {
 }
Beispiel #5
0
 public PawnBodyCommand(ToolkitChatCommand command) : base(command)
 {
 }
 public AwardPoints(ToolkitChatCommand command) : base(command)
 {
 }
Beispiel #7
0
 public Balance(ToolkitChatCommand command) : base(command)
 {
 }
Beispiel #8
0
 public PawnGearCommand(ToolkitChatCommand command) : base(command)
 {
 }
 public PawnStoryCommand(ToolkitChatCommand command) : base(command)
 {
 }
Beispiel #10
0
 public HelloWorld(ToolkitChatCommand command) : base(command)
 {
 }
 public JoinQueueCommand(ToolkitChatCommand command) : base(command)
 {
 }
Beispiel #12
0
 public PawnWorkCommand(ToolkitChatCommand command) : base(command)
 {
 }
 public PawnSkillsCommand(ToolkitChatCommand command) : base(command)
 {
 }
Beispiel #14
0
 public PawnNeedsCommand(ToolkitChatCommand command) : base(command)
 {
 }
Beispiel #15
0
 public TakePoints(ToolkitChatCommand command) : base(command)
 {
 }