public static IEnumerator DefaultCommand(TwitchHoldable holdable, string user, bool isWhisper, string cmd)
    {
        if (holdable.CommandType != null)
        {
            return(holdable.RespondToCommand(user, isWhisper));
        }

        return(holdable.RespondToCommand(user, cmd, isWhisper));
    }
Exemplo n.º 2
0
    public static IEnumerator DefaultCommand(TwitchHoldable holdable, string user, bool isWhisper, string cmd)
    {
        if (holdable.CommandType == typeof(AlarmClockCommands))
        {
            return(AlarmClockCommands.Snooze(holdable, user, isWhisper));
        }

        if (holdable.CommandType != null)
        {
            return(holdable.RespondToCommand(user, isWhisper));
        }

        return(holdable.RespondToCommand(user, cmd, isWhisper));
    }
Exemplo n.º 3
0
    public static IEnumerator DefaultCommand(TwitchHoldable holdable, string user, bool isWhisper, string cmd)
    {
        if (holdable.CommandType == typeof(AlarmClockCommands))
        {
            return(AlarmClockCommands.Snooze(holdable, user, isWhisper));
        }

        if (holdable.CommandType == typeof(IRCConnectionManagerCommands) ||
            holdable.CommandType == typeof(MissionBinderCommands) ||
            holdable.CommandType == typeof(FreeplayCommands))
        {
            return(holdable.RespondToCommand(user, isWhisper));
        }

        return(holdable.RespondToCommand(user, cmd, isWhisper));
    }
Exemplo n.º 4
0
 public static IEnumerator Disconnect(TwitchHoldable holdable, string user, bool isWhisper) =>
 holdable.RespondToCommand(user, string.Empty, isWhisper, Disconnect(holdable.Holdable.GetComponent <IRCConnectionManagerHoldable>()));
 public static IEnumerator Snooze(TwitchHoldable holdable, string user, bool isWhisper) =>
 holdable.RespondToCommand(user, "", isWhisper, Snooze(holdable.Holdable.GetComponent <AlarmClock>()));
 public static IEnumerator SnoozeMultiple(TwitchHoldable holdable, string user, bool isWhisper, [Group(1)] int times) =>
 holdable.RespondToCommand(user, "", isWhisper, Snooze(holdable.Holdable.GetComponent <AlarmClock>(), times));