Oaty

Commands Guide

Adding a command

You can either add a command by using the Panel UI, or via chat. Note: only the channel owner can add via chat at this time.

Adding via Chat

To add a custom command via chat, theres a command you can run!

Usage:

!cmd <add | remove> ...
!cmd add <name> <...message>
!cmd remove <name>
Tip: You can run !cmd --help to see brief usage details like the above, this works with any built in command, and subcommands of commands too!

Examples

!cmd add twitter Follow me on twitter @OatyBot https://twitter.com/OatyBot
!cmd add shoutout Shout out to @{input}, go follow them at https://glimesh.tv/{input}
Read more about message templating / variable substitution below
!cmd remove shoutout

Message Templating

We have built an advanced templating engine for custom commands on Oaty. This allows you to make your commands more interactive and aware of the world around them.

Substitutions start with { and end with } and can be inserted anywhere in your message body, as many times as you like. They follow the format:

{ <variable> : <key> = <value>, ... }
NameDescription
<variable> The name of the variable to substitute in, find a list of them below this section
<key> Key of the metadata that you want to use
<value> Value of the metadata you want to use

Substitutions can be just the variable part, or can contain a list of metadata after the :. This metadata can be used by certain variables to tweak their behaviour. For example the date variable supports a format for changing how it displays the date, more on this below.

Supported Variables

We'll be adding many more variables to use in the coming weeks but right now here's the complete list.

Name Metadata Description
input - Any and all text entered after the command name
sender - The username of the person who ran the command
at_user index=<int> The username of the person who was tagged (e.g. @Oaty). index allows picking nth tagged user
time format=<text> The current time. format allows you to change how it formats the time output. See this guide for the specifiers you can use.
date format=<text> The current date. format allows you to change how it formats the date output. See this guide for the specifiers you can use.
datetime format=<text> The current date and time. format allows you to change how it formats the date time output. See this guide for the specifiers you can use.

Examples

!cmd add now The current time is { time : format = "%H:%M:%S" }
!cmd add shoutout Shout out to @{ at_user }, go follow them at https://glimesh.tv/{ at_user }