Class Commands

java.lang.Object
io.github.jtwitch.command.Commands

public final class Commands extends Object
Repository of all possible Command.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Command
    This command will allow you to promote a user to a channel moderator allowing them to have access to all the above commands and features.
    static Command
    addVip​(String user)
     
    static Command
    ban​(String user)
    This command will allow you to permanently ban a user from the chat room.
    static Command
    block​(String user)
    This command will allow you to block all messages from a specific user in chat and whispers if you do not wish to see their comments
    static Command
    This command will allow the Broadcaster and chat moderators to completely wipe the previous chat history.
    static Command
    color​(ColorName colorName)
    Allows you to change the color of your username.
    static Command
    color​(String hexa)
    Allows you to change the color of your username.
    static Command
    commercial​(When when)
    An Affiliate and Partner command that runs a commercial for all of your viewers.
    static Command
    delete​(Message message)
    This command will delete the target message from the chat.
    static Command
    delete​(String messageId)
    This command will delete the target message from the chat.
    static Command
    This command will simply disconnect you from the chat server.
    static Command
    This command allows you to set your room so only messages that are 100% emotes are allowed.
    static Command
    This command allows you to disable emote only mode if you previously enabled it.
    static Command
    followers​(TimeUnit timeUnit)
    This command allows you or your mods to restrict chat to all or some of your followers, based on how long they’ve followed — from 0 minutes (all followers) to 3 months.
    static Command
    This command will disable followers only mode if it was previously enabled on the channel.
    static Command
    host​(String channel)
    This command will allow you to host another channel on yours (embedded video player).
    static Command
    marker​(String description)
    Adds a stream marker (with an optional description, max 140 characters) at the current timestamp.
    static Command
    me​(String text)
    This command will remove the colon that typically appears after your chat name and italicize your message text.
    static Command
    mention​(String user, String message)
    This command will allow you to target your message at a user, or reply directly to a specific message they’ve posted in the chat.
    static Command
    This command will display a list of all chat moderators for that specific channel.
    static Command
    raid​(String channel)
    This command will send the viewer to another live channel.
    static Command
    This command will allow you to demote an existing moderator back to viewer status (removing their moderator abilities).
    static Command
    removeVip​(String user)
     
    static Command
    timeout​(String user, Integer second)
    This command allows you to temporarily ban someone from the chat room for 10 minutes by default.
    static Command
    unblock​(String user)
    This command will allow you to block all messages from a specific user in chat and whispers if you do not wish to see their comments
    static Command
    Using this command will revert the embedding from hosting a channel and return it to its normal state.
    static Command
    This command disallows users from posting non-unique messages to the channel.
    static Command
    This command will disable Uniquechat mode if it was previously enabled on the channel.
    static Command
    This command will cancel the raid.
    static Command
    This command will display a list of VIPs for that specific channel.
    static Command
    whisper​(String user, String message)
    This command sends a private message to another user on Twitch.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • moderators

      public static Command moderators()
      This command will display a list of all chat moderators for that specific channel.
      Returns:
      the command to show moderators
    • vips

      public static Command vips()
      This command will display a list of VIPs for that specific channel.
      Returns:
      the command to show vips
    • color

      public static Command color(ColorName colorName)
      Allows you to change the color of your username. Normal users can choose between Blue, Coral, DodgerBlue, SpringGreen, YellowGreen, Green, OrangeRed, Red, GoldenRod, HotPink, CadetBlue, SeaGreen, Chocolate, BlueViolet, and Firebrick.
      Parameters:
      colorName - the new color of the bot in the chat
      Returns:
      the command to change color
    • color

      public static Command color(String hexa)
      Allows you to change the color of your username. Twitch Turbo users can use any Hex value (i.e: #000000).
      Parameters:
      hexa - the new color of the bot in the chat as hexa (only for premium twitch)
      Returns:
      the command to change color
    • block

      public static Command block(String user)
      This command will allow you to block all messages from a specific user in chat and whispers if you do not wish to see their comments
      Parameters:
      user - the user to ban
      Returns:
      the command to ban a user.
    • unblock

      public static Command unblock(String user)
      This command will allow you to block all messages from a specific user in chat and whispers if you do not wish to see their comments
      Parameters:
      user - the user to unban
      Returns:
      the command to unban a user.
    • me

      public static Command me(String text)
      This command will remove the colon that typically appears after your chat name and italicize your message text. Can be used to denote action in the third-person.
      Parameters:
      text - the message to write on the chat
      Returns:
      the "me" command
    • disconnect

      public static Command disconnect()
      This command will simply disconnect you from the chat server. To reconnect, simply refresh the page.
      Returns:
      the command to disconnect the bot to a chat.
    • whisper

      public static Command whisper(String user, String message)
      This command sends a private message to another user on Twitch.
      Parameters:
      user - the user to send the whisper
      message - the message to whisper
      Returns:
      the whisper command
    • mention

      public static Command mention(String user, String message)
      This command will allow you to target your message at a user, or reply directly to a specific message they’ve posted in the chat.
      Parameters:
      user - the user to mention
      message - the message to write to the mentioned user
      Returns:
      the mention command
    • delete

      public static Command delete(Message message)
      This command will delete the target message from the chat.
      Parameters:
      message - the message to delete from the chat
      Returns:
      the delete-message command
    • delete

      public static Command delete(String messageId)
      This command will delete the target message from the chat.
      Parameters:
      messageId - the message it from the message to delete from the chat
      Returns:
      the delete-message command
    • timeout

      public static Command timeout(String user, Integer second)
      This command allows you to temporarily ban someone from the chat room for 10 minutes by default. This will be indicated to yourself and the temporarily banned subject in chat on a successful temporary ban. A new timeout command will overwrite an old one.

      The command also supports banning for a specific set of time via the optional [SECONDS] value.

      To clear a timeout, either use the Unban command or overwrite the current timeout with a new, 1-second one.

      Parameters:
      user - the user to timeout
      second - the number of second of timeout
      Returns:
      the timeout command
    • ban

      public static Command ban(String user)
      This command will allow you to permanently ban a user from the chat room.
      Parameters:
      user - the user to ban
      Returns:
      the ban command
    • followers

      public static Command followers(TimeUnit timeUnit)
      This command allows you or your mods to restrict chat to all or some of your followers, based on how long they’ve followed — from 0 minutes (all followers) to 3 months.
      Parameters:
      timeUnit - the time a follower need to follow a streamer to speak on the channel
      Returns:
      the follower restrict chat command
    • followersOff

      public static Command followersOff()
      This command will disable followers only mode if it was previously enabled on the channel.
      Returns:
      the follower restrict chat off command
    • clear

      public static Command clear()
      This command will allow the Broadcaster and chat moderators to completely wipe the previous chat history.
      Returns:
      the command to clear the chat
    • uniqueChat

      public static Command uniqueChat()
      This command disallows users from posting non-unique messages to the channel. It will check for a minimum of 9 characters that are not symbol unicode characters and then purges any repetitive chat lines beyond that. Uniquechat is a unique way of moderating, which essentially allowing you to stop generic copy-pasted messages intended as spam among over generally annoying content.
      Returns:
      the unique message in chat command
    • uniqueChatOff

      public static Command uniqueChatOff()
      This command will disable Uniquechat mode if it was previously enabled on the channel.
      Returns:
      the unique message in chat off command
    • emoteOnly

      public static Command emoteOnly()
      This command allows you to set your room so only messages that are 100% emotes are allowed.
      Returns:
      the emote-only in chat command
    • emoteOnlyOff

      public static Command emoteOnlyOff()
      This command allows you to disable emote only mode if you previously enabled it.
      Returns:
      the emote-only in chat off command
    • commercial

      public static Command commercial(When when)
      An Affiliate and Partner command that runs a commercial for all of your viewers.
      Parameters:
      when - when the commercial advertising should be run (30|60|90|120|150|180)
      Returns:
      the command to run a commercial advertising
    • host

      public static Command host(String channel)
      This command will allow you to host another channel on yours (embedded video player).
      Parameters:
      channel - the channel to host
      Returns:
      the command to host someone
    • unhost

      public static Command unhost()
      Using this command will revert the embedding from hosting a channel and return it to its normal state.
      Returns:
      the command to unhost someone
    • raid

      public static Command raid(String channel)
      This command will send the viewer to another live channel.
      Parameters:
      channel - the channel to raid
      Returns:
      the command to raid someone
    • unraid

      public static Command unraid()
      This command will cancel the raid.
      Returns:
      the command to unraid someone
    • marker

      public static Command marker(String description)
      Adds a stream marker (with an optional description, max 140 characters) at the current timestamp. You can use markers in the Highlighter for easier editing.
      Parameters:
      description - the description of the marker
      Returns:
      the command to add a stream marker
    • addModerator

      public static Command addModerator(String user)
      This command will allow you to promote a user to a channel moderator allowing them to have access to all the above commands and features.
      Parameters:
      user - the user to grant privileges
      Returns:
      the add to moderator command
    • removeModerator

      public static Command removeModerator(String user)
      This command will allow you to demote an existing moderator back to viewer status (removing their moderator abilities).
      Parameters:
      user - the user to remove privileges
      Returns:
      the remove to moderator command
    • addVip

      public static Command addVip(String user)
      Parameters:
      user - the user to grant privileges
      Returns:
      the add to vip command
    • removeVip

      public static Command removeVip(String user)
      Parameters:
      user - the user to remove privileges
      Returns:
      the remove to vip command