Skip to content

Petto Code

Build your own commands. Embeds, functions, buttons that run code, data that is remembered, and your own prefixes.

Petto Code is the language of Petto’s custom commands. You write normal text, and put what changes inside {{ }}:

Hello {{ .User.Username }}! This server has {{ .Guild.MemberCount }} members.
{{ if hasRole "223456789012345678" }}You are part of the staff. 💖{{ end }}

Embeds and messages

Make embeds with fields, colors and images, and send them to any channel you and Petto can write in. Embeds

Buttons and menus

Buttons and menus that run code: votes, role menus, shops. One command holds the whole system. Buttons

Reactions

Change a message, give a role or answer when someone reacts with an emoji. Reactions

Stored data

Counters, points, rankings, cooldowns and lists that every command of your server can remember. Stored data

Your own prefix

Start a command with ?hello, >>shop, or just by saying good morning. Triggers

1. Install a template

!customcommand template lists the ready-made commands. !customcommand template roll installs one.

2. Change it

!customcommand codeshow roll shows its code. Write your own with !customcommand code <name> <code>.

3. Test without risk

!customcommand codetest shows what code would print and do, without sending or changing anything.

4. Share it

!customcommand export roll gives a code any server can import.