Commands
A command is a word your chat types that the bot answers. Pyre ships a set of them and lets you write your own.
Create a command
Section titled “Create a command”
-
Open Commands and add a new one. The editor opens in a rail on the right.
-
Give it a Name, the word chat types, for example
discord. -
Write the Response. Plain text works. Variables make it useful, and the chips under the box insert them for you.
-
Choose the Trigger style.
! Prefixanswers!discord.Keyword (anywhere)answers the word wherever it appears in a message. -
Add Aliases if you want more than one way to run it. Comma separated.
-
Choose Who can use it: Everyone, Subscriber, VIP, Moderator or Broadcaster.
-
Set the cooldowns. Cooldown (seconds) is global, between any two uses, and starts at 5. Per-user cooldown applies to each viewer separately and starts at 0, meaning off.
-
Set the Live gate if it should only work at certain times:
Always available, orOff while live.
Change a built in command
Section titled “Change a built in command”You cannot rewrite what !uptime says or what !clip does. You can change who may
run it, how often, and what else it answers to, and those three live on the
same row as its on/off switch.
They are all on this page, in the Built in commands card under your own commands. It used to take two pages and two different looking rows to say the same thing, so they are now one card and one row.
Who can use it
Section titled “Who can use it”A select with the levels Everyone, Subscriber, VIP, Moderator and Broadcaster, headed
by an option that names what the command starts at, for example Default (Everyone).
Leave it on the default and the command keeps whatever Pyre ships it as. Pick a level
and only viewers at or above it get an answer.
A viewer below the level gets silence rather than a refusal. That is deliberate: a bot that says “you cannot use that” to everyone who tries is a bot that spams your chat.
Some commands have a floor. The protection commands (!panic, !standdown, !monitor,
!restrict, !unrestrict) start at Moderator and will not go below it, and the row
tells you so. A safety command that a forgotten setting can hand to everyone is worse
than one you cannot loosen.
Cooldown
Section titled “Cooldown”A cooldown box holds a number of seconds. Leave it empty and the command keeps its own cooldown, which the box shows you as faint placeholder text. Type 0 and the command has no cooldown at all. Those are two different answers, and an empty box is not the same as a zero.
A command shows only the kinds of cooldown it actually has:
- Channel is one window for the whole chat. The next person to type it waits, even if they have never used it.
- Per viewer is one window each. Two viewers can run it at the same moment; neither can run it twice in a row.
Most commands have one or the other. !pyramid is the one with both, because it floods
chat with lines and needed a channel limit on top of its per viewer one. A command with
no cooldown at all says No cooldown rather than offering a box that would do
nothing.
The longest cooldown you can set is 3600 seconds, one hour. Ask for more and it saves as one hour and the box shows you that it did.
Extra spellings
Section titled “Extra spellings”The Command column carries the names a command already answers to, and lets you add
your own. Type a word in the small + alias box and press Enter. !c for !clip, !ut
for !uptime. Click the small x on a chip to take one away.
A spelling is only a spelling. Everything else about the command stays put: its on/off switch, its level, its cooldowns and its live gate all still apply when someone types the alias. That is the point of it, and it is why an alias cannot be used to get around a command you turned off.
A spelling has to be free. Pyre refuses one that is already:
- the name of a command Pyre ships,
- the name of a command you wrote, or one of its own aliases,
- another alias you already added.
It works the other way too: once !c is an alias, you cannot create a command called
!c, and you cannot rename one to it. The message says which of the three it ran into.
To point an existing alias somewhere else, remove it and add it again, so a word never
quietly changes what it does.
Aliases are one word. Pyre only ever reads the first word after the !, so a two word
alias could never fire.
Built in commands
Section titled “Built in commands”Every command Pyre ships is in the Built in commands card, under your own commands on this page. Your commands come first for a reason: a command you write wins over the built in of the same name, and when it does, the built in stops being listed at all.
Finding one
Section titled “Finding one”The card holds a lot of commands, so it opens mostly folded.
- Chat basics is open to start with:
!commands,!uptime,!followage,!game,!title,!8ball,!roll,!quoteand your social links. - Everything else sits behind a group you click open: Games, Loyalty, Songs & Media, Stream, Ads, Raids, Protection, AI, Lookups, Personal, Social and Compose.
- Loyalty holds the points commands your viewers type:
!points,!watchtime,!leaderboard,!items,!redeem, and the moderator ones!openstoreand!raffle. They each get the same switch, level and cooldown as any other row. What each one does is covered in Loyalty and points. - Lookups also holds
!help, which tells a viewer what a command does or links your full list, and!stats, which names your most used commands. - The filter box searches all of them at once, by name, by a spelling you added, or by group, and it opens whatever it finds. Nothing is fetched while you type.
- Collapse all folds the lot away when you are done, and offers to open them again.
A group’s heading tells you how many commands are in it and, when any of them are switched off, how many.
What a row gives you
Section titled “What a row gives you”Every row is the same row, whichever group it is in:
- On enables or disables the command. A switched off row dims in place rather than disappearing, so the switch you flipped is where you left it.
- Who can use it and Cooldown, exactly as described above.
- Extra spellings, exactly as described above.
- When it works:
Always availableorOff while live.!fishis the exception, offeringAll fishing commands,Traps onlyandNothing, because its traps can keep running when the rest of the family is not.
A row can carry an environment off chip. That means the command’s family is turned off on the server right now, not that you did something wrong: your setting is saved and takes effect if it comes back on.
A social row can say that it will switch itself on once your Discord link is set, or say the same about another network. That row has no words of its own: it answers with the link on your public profile, so until there is a link there is nothing to say and the switch stays out of reach.
The Ads group says Managed by Ads settings in its heading, and its rows say the same thing where a level and a cooldown would be. See the aside above for why.
The AI group
Section titled “The AI group”!ask and !summarize are ordinary rows with their own switch, so a pair set
differently reads as such. What the group adds is a footer, on your own channel only,
saying whether AI is available on this server at all and which model is answering
with its budget. If the server has no AI key configured the footer says so plainly, and
your settings are still saved for when an operator turns it on.
Coinflip
Section titled “Coinflip”!coinflip is the one built in whose words you can change, and it grew a
little in the process.
Calling a side
Section titled “Calling a side”!coinflip flip, no stake!coinflip tails call a side, no stake, no points!coinflip 100 stake 100 on heads!coinflip tails 100 call tails and stake 100!coinflip 100 tails the same bet, written the other way roundheads, head, h, tails, tail and t all work, in any capitalisation, and
the side and the stake go in either order. Anything else gets the usage line back
rather than a flip nobody meant.
!coinflip 100 on its own still means heads, exactly as it always did, so nobody
has to relearn a bet they have been placing for months.
A call with no stake is just for fun: the bot tells you whether you called it, and no points move.
The edge
Section titled “The edge”One flip in a thousand lands on the edge, and the edge pays ten times the stake. It wins whichever side you called, and it beats a wrong call: the whole point of it is the moment, not the odds.
That does make a called flip very slightly generous, on purpose. Over a long run a staked call returns about one percent more than it costs, which is your own currency being a little kind to the people who turn up.
Your own words for the outcomes
Section titled “Your own words for the outcomes”The three words the coin can land on are yours. In the Built in commands card, open
the Games group, find the !coinflip row and open Customize outcomes. Three boxes: Heads, Tails
and Edge. Type up to 40 characters each and they save as you leave the box.
Leave a box empty to keep the word it ships with, and clearing a box you filled in is how you put the shipped word back. The placeholder always shows you what that word is.
Only the words change. The sentence around them stays put, including everything it says about points, so a renamed outcome can never make the bot lie about somebody’s balance.
If your channel has switched points off, an
unstaked !coinflip still flips. A staked one says so.
!time tells the time, three ways.
!time the streamer's own time!time @someone a viewer's time, if they set one!time Berlin the time in a placeOn its own, !time answers with your time as the streamer, taken from the
timezone you stored with !set timezone. If you have not stored one yet it says
so, and it never falls back to whoever typed the command, because they already
know their own time.
!time @name (the @ is optional) answers with that viewer’s time, but only
when they have stored a timezone of their own with !set timezone, and only when
they have not opted out of being looked up. If the name has no stored timezone, or
that viewer opted out, the word is treated as a place instead.
Anything that is not a known viewer with a stored timezone is looked up as a
place, exactly as before: !time Tokyo gives Tokyo’s time. A viewer who set a
timezone wins over a place of the same name, so in the rare case a regular of
yours is named after a city, the person comes first.
Chat stats (!7stats)
Section titled “Chat stats (!7stats)”!7stats answers with your channel’s chat and emote stats from
7stats, the Twitch chat tracker that is part of Pyre. It is on
for every channel and anyone can use it.
!7stats this channel's stats!7stats top 5 the top 5 emotes!7stats emote KEKW how often KEKW was used!7stats chatters 3 the 3 most active chatters!7stats me your own most used emotes!7stats @someone someone else'sAdd a period to any of them: 24h, 7d, 30d or all, for example
!7stats top 3 30d. Without one it covers the last 7 days.
It works on Twitch only, because 7stats reads Twitch chat. Pyre streamers with Twitch connected are tracked automatically. If you switched tracking off, it answers:
7stats isn't tracking yourchannel right now.Like any built in command you can switch it off, change who can use it or give it a longer cooldown under Built in commands.
Fishing
Section titled “Fishing”!fish is a game your viewers play in chat: cast for fish, sell the catch for
fishing coins, and spend the coins on better rods, traps and titles. It has its own
page: Fishing.
Cookie and horoscope
Section titled “Cookie and horoscope”!cookie opens one fortune cookie per viewer per day. There are about 300 of them.
!horoscope gives today’s reading for a star sign:
!horoscope leo today's reading for Leo!horoscope set leo remember your sign!horoscope your own reading, once your sign is savedA sign can be written as its name, the first three letters, or its symbol. Pyre remembers only the sign, never a date of birth. There is one reading per sign per day, the same in every channel, and it is written fresh each day. It is for fun and is not advice of any kind.
Both belong to the same group as !fish, so you can switch them off, change who can
use them or lengthen the cooldown under Built in commands.
When a command answers nothing
Section titled “When a command answers nothing”Some commands go and fetch their answer from somewhere else. $(urlfetch …) calls an
API you name, $(eval …) runs a snippet, $(uptime) and friends ask the platform. When
one of those is slow, down, or answers with nothing, Pyre puts nothing in its place, the
reply comes out empty, and an empty reply is not posted.
That is the right behaviour, and it used to be completely invisible. Chat saw silence, you saw silence, and there was no way to tell a broken API from a command nobody had run. Two switches in the command editor, under Conditions, fix that.
Note it when this answers nothing is on. When a command that had something to say comes out empty, Pyre writes a line in your activity log saying so, naming the command. Nothing is posted in chat. If the same command keeps coming out empty, you get one line a minute rather than one per attempt, so a broken API cannot bury the rest of your log.
Reply instead of staying silent is off. Turn it on and the viewer who typed the command gets one short line instead of nothing:
That command’s source didn’t answer just now. Try again in a moment.
Both switches are on commands you wrote. A command Pyre ships has a fixed response that never goes and asks anything, so it is not offered either one.
You can also set both from chat when you add or edit a command, alongside the level and
cooldown flags. Booleans take on or off:
!command edit !rp -logempty=offstops the activity log line.!command edit !rp -emptyreply=onturns the chat reply on.
The same -logempty= and -emptyreply= work on !command add. A value that is not a
yes or no is refused with a short usage line rather than guessed at.
Variables
Section titled “Variables”Variables let one command answer differently every time it runs. They cover the person who ran it, the arguments they typed, random numbers, counters you keep, and values fetched from a URL.
The Commands editor lists them as chips with a one line description each: the common ones are shown, and the rest are one click away. Click a chip to drop it into your response rather than typing it from memory.
Timers
Section titled “Timers”A timer posts on a schedule. It is not a command on a clock: a timer carries its own message rotation. The main Message and the extra lines under Also rotate through are one list, up to twenty extra lines, and the timer works through them one per fire, so a full cycle is twenty one posts before it repeats.
Two settings decide when it fires:
- Every (minutes), from 1 to 1440, starting at 15.
- Min. chat lines, an optional floor that holds the timer back until that many messages have been said since it last posted. It starts at 0, which means the timer fires on its interval regardless. Set it if you do not want a bot talking to an empty room.
A timer posts to every platform you have connected, so one fire is one message in each of your chats, and on YouTube each of those spends API quota. What Pyre does merge is timers that come due together: several timers due in the same scheduling pass go out as a single post per channel rather than a burst.
Timers have a guide of their own, covering the rotation, the activity gate and the live only switch in full: Timers.
Importing from another bot
Section titled “Importing from another bot”Moving from another bot does not mean retyping everything. The Import page under Tools brings your commands across from StreamElements, Fossabot, Nightbot or Streamlabs. It previews what it found before it writes anything, and it never overwrites a command you already have.
Import has a guide of its own, covering what each source can actually give you, how your variables get rewritten, and what gets skipped and why: Import from another bot.