└── readme.md /readme.md: -------------------------------------------------------------------------------- 1 | 2 | Twitch Bot Custom Commands 3 | ========================== 4 | 5 | Commands cheatsheet 6 | 7 | - [Nightbot](#nightbot) 8 | - [Important commands](#important-commands) 9 | - [8 Ball](#8-ball) 10 | - [Coin Flip (random)](#coin-flip-random) 11 | - [Random with emote](#random-with-emote) 12 | - [Pick from comma-delimited query](#pick-from-comma-delimited-query) 13 | - [Win Counter with reset](#win-counter-with-reset) 14 | - [Shoutout that allows "@" prefix](#shoutout-that-allows--prefix) 15 | - [Current time](#current-time) 16 | - [Slap random person](#slap-random-person) 17 | - [Repeat word a random number of times](#repeat-word-a-random-number-of-times) 18 | - [User levels](#user-levels) 19 | - [Cooldown](#cooldown) 20 | - [Stream Elements (chat bot)](#stream-elements-chat-bot) 21 | - [Important Commands](#important-commands-1) 22 | - [8-ball (custom, with default 8-ball disabled)](#8-ball-custom-with-default-8-ball-disabled) 23 | - [Coinflip](#coinflip) 24 | - [Random with emote](#random-with-emote-1) 25 | - [Win Counter](#win-counter) 26 | - [Shoutout](#shoutout) 27 | - [Current time](#current-time-1) 28 | - [Slap random person](#slap-random-person-1) 29 | - [Repeat word random number of times](#repeat-word-random-number-of-times) 30 | - [User levels](#user-levels-1) 31 | - [Cooldown](#cooldown-1) 32 | - [Streamlabs Cloudbot](#streamlabs-cloudbot) 33 | - [TODO](#todo) 34 | 35 | # Nightbot 36 | 37 | ## Important commands 38 | 39 | * `!commands add [command]` 40 | * `!commands edit [command]` 41 | * `!commands edit [command] -cd=5`: Change cooldown to 5 seconds (minimum is 5 seconds) 42 | * `!commands remove [command]` 43 | * `!commands add [command] -a=!meow`: Add command as an alias to the `!meow` command (must include arguments after `-a=!meow` if arguments are required) 44 | 45 | ## 8 Ball 46 | 47 | `!commands add !8ball @$(user) , 🎱 $(eval const responses = ['All signs point to yes...', 'Yes!', 'My sources say nope.', 'You may rely on it.', 'Concentrate and ask again...', 'Outlook not so good...', 'It is decidedly so!', 'Better not tell you.', 'Very doubtful.', 'Yes - Definitely!', 'It is certain!', 'Most likely.', 'Ask again later.', 'No!', 'Outlook good.', 'Don\'t count on it.']; responses[Math.floor(Math.random() * responses.length)];)` 48 | 49 | Example: 50 | 51 | > jayther: !8ball Will I finish this readme? 52 | > 53 | > Nightbot: @jayther , 🎱 All signs point to yes... 54 | 55 | ## Coin Flip (random) 56 | 57 | `!commands add !coinflip @$(user), you got $(eval ['Kappa Heads','Squid4 Tails'][Math.floor(Math.random()*2)]).` 58 | 59 | Example: 60 | 61 | > jayther: !coinflip Heads I will finish this readme today. 62 | > 63 | > Nightbot: @jayther , you got Kappa Heads. 64 | 65 | ## Random with emote 66 | 67 | `!commands add !fix $(eval ['Unable to comply, building in progress.','Cannot build here.','Insufficient Funds','Cannot deploy here','Unit lost'][Math.floor(Math.random()*5)] + ' ' + ['MrDestructoid','Kappa','SSSsss','BloodTrail','SMOrc'][Math.floor(Math.random()*5)])` 68 | 69 | Example: 70 | 71 | > jayther: !fix 72 | > 73 | > Nightbot: Unable to comply, building in progress. MrDestructoid 74 | 75 | ## Pick from comma-delimited query 76 | 77 | `!commands add !pick @$(user) , I pick $(eval const a='$(query)'.split(','); a[Math.floor(Math.random()*a.length)]).` 78 | 79 | Example: 80 | 81 | > jayther: !pick me, myself, I 82 | > 83 | > Nightbot: I pick me. 84 | 85 | ## Win Counter with reset 86 | 87 | * `!commands add !wins 0 wins.` 88 | * `!commands add !addwin -a=!commands edit !wins $(count) wins.` 89 | * `!commands add !resetwins -a=!commands edit !addwin \-c=-1` 90 | * `!commands add !refreshwins -a=!commands edit !wins 0 wins.` 91 | 92 | Example: 93 | 94 | > jayther: !wins 95 | > 96 | > Nightbot: 2 wins. 97 | 98 | > jayther: !addwin 99 | > 100 | > Nightbot: The command "!wins" has been edited successfully. 101 | > 102 | > jayther: !wins 103 | > 104 | > Nightbot: 3 wins. 105 | 106 | Note: You will need to run `!resetwins` and `!refreshwins` to reset the win counter to 0, since `!resetwins` does not update `!wins`. 107 | 108 | Example: 109 | 110 | > jayther: !resetwins 111 | > 112 | > Nightbot: The command "!addwin" has been edited successfully. 113 | > 114 | > jayther: !refreshwins 115 | > 116 | > Nightbot: The command "!wins" has been edited successfully. 117 | > 118 | > jayther: !wins 119 | > 120 | > Nightbot: 0 wins. 121 | 122 | ## Shoutout that allows "@" prefix 123 | 124 | `!commands add !so Check out $(twitch $(eval '$(touser)'.replace('@','')) "{{displayName}} at {{url}} ! Last seen playing {{game}}")` 125 | 126 | Example: 127 | 128 | > jayther: !so jayther 129 | > 130 | > Nightbot: Check out jayther at https://twitch.tv/jayther ! Last seen playing Science & Technology 131 | 132 | ## Current time 133 | 134 | `!commands add !time It's $(time America/Los_Angeles "h:mm a z") for $(channel)` 135 | 136 | Note: Replace `America/Los_Angeles` with your own timezone ID from [Nightbot's Timezones](https://docs.nightbot.tv/commands/variables/time#timezones). 137 | 138 | Example: 139 | 140 | > jayther: !time 141 | > 142 | > Nightbot: It's 6:00 pm PDT for jayther 143 | 144 | ## Slap random person 145 | 146 | `!commands add !slap $(user) has slapped $(urlfetch https://2g.be/twitch/randomviewer.php?channel=$(channel))` 147 | 148 | Example: 149 | 150 | > jayther: !slap 151 | > 152 | > Nightbot: jayther has slapped uwu_twanswator 153 | 154 | ## Repeat word a random number of times 155 | 156 | `!commands add !boom $(eval 'boom'.repeat(Math.floor(Math.random()*8) + 1))` 157 | 158 | Example: 159 | 160 | > jayther: !boom 161 | > 162 | > Nightbot: boom boom boom boom 163 | 164 | Note: Range is 1-9 (0-8 plus 1). 165 | 166 | ## User levels 167 | 168 | Set minimum user level for a command. 169 | 170 | `!commands edit ![name] -ul=[level]` 171 | 172 | `name`: Command name 173 | 174 | `level`: Minimum level 175 | 176 | **Levels**: 177 | 178 | * Owner: `owner` 179 | * Mod: `moderator` 180 | * Regular: `regular` 181 | * Sub: `subscriber` 182 | * Everyone: `everyone` 183 | 184 | ## Cooldown 185 | 186 | Set cooldown for a command. 187 | 188 | `!commands edit ![name] -cd=[seconds]` 189 | 190 | `name`: Command name 191 | 192 | `seconds`: Cooldown in seconds (5 seconds minimum) 193 | 194 | # Stream Elements (chat bot) 195 | 196 | ## Important Commands 197 | 198 | * `!command add ![command]` 199 | * `!command edit ![command]` 200 | * `!command remove ![command]` 201 | * `!command options ![command] -enable`: Enable command 202 | * `!command options ![command] -disable`: Disable command 203 | * `!command alias add [command] meow`: Add `!meow` as an alias command to `![command]`. 204 | 205 | ## 8-ball (custom, with default 8-ball disabled) 206 | 207 | `!command add !8ball @${sender} , 🎱 ${random.pick 'All signs point to yes...' 'Yes!', 'My sources say nope.' 'You may rely on it.' 'Concentrate and ask again...' 'Outlook not so good...' 'It is decidedly so!' 'Better not tell you.' 'Very doubtful.' 'Yes - Definitely!' 'It is certain!' 'Most likely.' 'Ask again later.' 'No!' 'Outlook good.' 'Don\'t count on it.'}` 208 | 209 | Example: 210 | 211 | > jayther: Will I finish this readme? 212 | > 213 | > StreamElements: @jayther, 🎱 Better not tell you. 214 | 215 | ## Coinflip 216 | 217 | `!command add !coinflip @${sender} , you got ${random.pick 'Kappa Heads' 'Squid4 Tails'}` 218 | 219 | Example: 220 | 221 | > jayther: !coinflip 222 | > 223 | > StreamElements: @jayther , you got Kappa Heads 224 | 225 | ## Random with emote 226 | 227 | `!command add !fix ${random.pick 'Unable to comply, building in progress.' 'Cannot build here.' 'Insufficient Funds' 'Cannot deploy here' 'Unit lost'} ${random.emote}` 228 | 229 | Example: 230 | 231 | > jayther: !fix 232 | > 233 | > StreamElements: Unit lost SMOrc 234 | 235 | ## Win Counter 236 | 237 | `!command add !wins ${channel} has won ${getcount wins} times!` 238 | 239 | `!command add !addwin ${channel} has won ${count wins +1} times!` 240 | 241 | `!command add !resetwins ${channel} has won ${count wins 0} times!` 242 | 243 | `!command add !setwins ${channel} has won ${count wins ${1}} times!` 244 | 245 | Example: 246 | 247 | > jayther: !wins 248 | > 249 | > StreamElements: jayther has won 2 times! 250 | > 251 | > jayther: !addwin 252 | > 253 | > StreamElements: jayther has won 3 times! 254 | > 255 | > jayther: !resetwins 256 | > 257 | > StreamElements: jayther has won 0 times! 258 | > 259 | > jayther: !setwins 20 260 | > 261 | > StreamElements: jayther has won 20 times! 262 | 263 | ## Shoutout 264 | 265 | `!command add !so Check out ${user ${1}} at https://twitch.tv/${channel ${1}} ! Last seen playing ${game ${1}}` 266 | 267 | Example: 268 | 269 | > jayther: !so jayther 270 | > 271 | > StreamElements: Checkout jayther at https://twitch.tv/jayther ! Last seen playing Science & Technology 272 | 273 | ## Current time 274 | 275 | `!command add !time It is currently ${time.PST} for ${channel}.` 276 | 277 | Example: 278 | 279 | > jayther: !time 280 | > 281 | > StreamElements: It is currently 1:52 for jayther. 282 | 283 | ## Slap random person 284 | 285 | `!command add !slap ${user} has slapped ${random.chatter}` 286 | 287 | Example: 288 | 289 | > jayther: !slap 290 | > 291 | > StreamElements: jayther has slapped uwu_twanswator 292 | 293 | ## Repeat word random number of times 294 | 295 | `!command add !boom ${repeat ${random.1-9} 'boom'}` 296 | 297 | Example: 298 | 299 | > jayther: !boom 300 | > 301 | > StreamElements: boom boom boom boom 302 | 303 | ## User levels 304 | 305 | Set minimum user level for commands. 306 | 307 | `!command options ![name] -level [amt]` 308 | 309 | `name`: Command Name 310 | 311 | `amt`: Level 312 | 313 | **Levels**: 314 | 315 | * Everyone: 100 316 | * Subs: 250 317 | * Regular: 300 318 | * Mod: 500 319 | * Supermod: 1000 320 | * Broadcaster: 1500 321 | 322 | ## Cooldown 323 | 324 | Set cooldown for commands. 325 | 326 | There are two kinds of cooldowns: 327 | * **Global**: cooldown for everyone (when one person triggers it, no one else can trigger it until the cooldown passes) 328 | `!command options ![name] -cd [seconds]` 329 | * **User**: cooldown for each person (when one person triggers it, only that person cannot trigger it again until the 330 | cooldown passes) 331 | `!command options ![name] -usercd [seconds]` 332 | 333 | `name`: Command name 334 | 335 | `seconds`: Cooldown in seconds. 336 | 337 | # Streamlabs Cloudbot 338 | 339 | ## TODO 340 | --------------------------------------------------------------------------------