Ejemplo n.º 1
0
        async Task ICommand.Process(MessageInfo message)
        {
            //get template
            string msgParam;
            Match  match = regCameraCommand.Match(message.Content);

            if (match.Success)
            {
                if (!string.IsNullOrWhiteSpace(match.Groups["param"].Value))
                {
                    msgParam = match.Groups["param"].Value.ToLowerInvariant().Trim();

                    string            response = string.Empty;
                    VrcCameraCommands command;

                    // Choose response and osc command based on !camera <param> value
                    switch (msgParam)
                    {
                    case "stairs":
                    case "back":
                        response = "Moving camera to the back.";
                        command  = VrcCameraCommands.Back;
                        break;

                    case "dj":
                    case "front":
                        response = "Moving camera to the DJ.";
                        command  = VrcCameraCommands.DJ;
                        break;

                    case "stage":
                    case "side":
                        response = "Moving camera to the stage.";
                        command  = VrcCameraCommands.Stage;
                        break;

                    case "move":
                    case "animate":
                        response = "Animating camera.";
                        command  = VrcCameraCommands.Move;
                        break;

                    default:
                        response = $"Follow !camera with one of the following parameters: {GetCameraCommands()}";
                        command  = VrcCameraCommands.None;
                        break;
                    }

                    await tw.RespondMessageAsync(response);    // Respond to twitch chat

                    await osc.SendMessageAsync(command);       // Send OSC command to vrc
                }
                else
                {
                    await tw.RespondMessageAsync($"Follow !camera with one of the following parameters: {GetCameraCommands()}");
                }
            }
        }
Ejemplo n.º 2
0
 public async Task Process(MessageInfo message)
 {
     await tw.RespondMessageAsync("Commands: !howlong [user], !uptime [channel], !viewers, !madlib [template] (template keywords: noun/adjective/verb/adverb)");
 }