Example #1
0
        public static async void handleCommand(TwitchLib.TwitchChatClient.OnCommandReceivedArgs e)
        {
            if (verifyCommand(e))
            {
                if (e.Command.ToLower() == e.ChatMessage.Username.ToLower() || e.ChatMessage.Username.ToLower() == "swiftyspiffy")
                {
                    if (e.ArgumentsAsList.Count == 0)
                    {
                        Common.ChatClient.SendMessage(await WebCalls.getSetPersonalCommand(e.ChatMessage.Username, null));
                    }
                    else
                    {
                        string resp = await WebCalls.getSetPersonalCommand(e.ChatMessage.Username, e.ArgumentsAsString);

                        Common.ChatClient.SendMessage(resp, Common.DryRun);
                    }
                }
                Common.command(e.Command, true);
            }
            else
            {
                Common.command(e.Command, false);
            }
        }