The Petto Code Generator is a website that writes Petto Code for you. You pick what the command does with forms, try it in a channel that looks and works like Discord, and copy the command into your server.Open it at codegen.petto.sbs. It is free and needs no login.
Nothing leaves the page. The generator never touches your server. Your commands only reach Discord when you paste the install command yourself.
Open the Builder. Start from one of the 21 recipes, from an official template, or from an empty command. Fill only the parts you need: the name, how it starts, the answer, buttons, a form, reactions, requirements and extras. Variables like {user} or {server} work anywhere. The code is written and checked while you go.
2
Try it
The Try it tab is a test channel that runs the command with the real engine of Petto. Type the command, press its buttons, choose in its menus, fill its forms and react. You see what it would print and what it would do: roles given or taken, DMs, deleted messages, the stored data and a log of every use. You can switch between two test people to try what someone else sees.
3
Install it
The Install tab gives the !customcommand code command ready to paste in your server, and the !customcommand trigger command when it starts with its own prefix or words. It also gives a share code (pc1.) for !customcommand import.
In Discord: the install command pasted in a server; Petto checks the code and saves it.
In Discord: the same command installed from its share code.
Want to change something by hand? Edit as code opens the command in the code editor, with colors, line numbers, a check on every key (with the line and the column of a mistake) and every function and piece of data ready to insert.
An answer in the channel, in a DM or in another channel, as text or an embed with fields, colors, images and the author.
Buttons and menus
Buttons and a dropdown menu that answer, give or take a role, or open a form. They can be locked to the person who used the command.
Forms
A pop-up form (modal) with text fields, menus of choices, radio buttons, checkboxes, pickers of members, roles and channels, files to upload and texts that inform. The answers go into a message, for example to a staff channel.
Reactions
Something that happens when people react: a role, a DM, an answer in the channel or a change to the message. A reaction can be only for the person who used the command.
Roles
Give, take or toggle a role from a command, a button, a menu option or a reaction.
Counters and random answers
A counter that goes up on every use or click, and an answer picked at random from a list.
Cooldowns and requirements
How often a command can be used, and which roles or channels it needs.
Coins and rankings
Stored data for each member: a daily reward, a balance and a leaderboard of the server.
Triggers
Start with the prefix of Petto, with a prefix of its own (?hello), or with a message that starts with, is exactly or contains some words.
Recipes and templates
21 recipes (verification, role menu, reaction role, suggestions, reports, daily coins, leaderboard, requests by reaction and more) and every official template of the bot.
These make request cards and other messages that change over time possible without writing code.
Some parts of the embed: when a button, a menu option or a reaction changes the message, it can keep the embed as it is (with everything the command wrote in it) and change only the parts you fill: a new title, description, footer or color. A part you leave empty stays.
Only who used the command: for each button and each reaction. Anyone else pressing the button is told This is not for you; anyone else’s reaction is taken away, with an optional DM like Only who asked can confirm it. A reaction knows who used the command because Petto remembers it with the message (.Message.CommandUserID in Petto Code).
Close the message by its footer: when the footer of the embed says a word, like Delivered, its buttons, menus and reactions stop answering. A reaction is taken away, and a click gets an optional answer like This one is already closed.
A share code starts with pc1. and holds a whole command.
Out: the Install tab gives the share code of your command. Anyone can use it in their server with !customcommand import <share code> [name].
In: paste a share code in the Import tab to read its code and check it before you use it. Then open it in the editor to change it. The whole line works too, with !customcommand import in front.
A code from !customcommand export in Discord works in the generator, and a code from the generator works in Discord.
My commands keeps the commands you save in your browser. You can export them as a JSON file and import them again on another device. Nothing is saved on a server.The website is in English, Spanish and Portuguese, with a light and a dark theme. The default texts of the commands follow the language you pick.
The generator runs the same Petto Code engine as Petto, with the same checks, functions and limits (10,000 characters, 10,000 steps, 250 ms of running time, 25 reads and writes of stored data per use). What works in the generator works in your server.What it cannot test is what depends on Discord: the permissions of Petto in the channel, a role above Petto’s role or with moderation permissions, or someone with closed DMs. Petto checks those when the command runs. See Limits and safety.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Petto","colors":{"primary":"#f0a88f","light":"#bd5136","dark":"#f0a88f"},"logo":{"light":"https://mintcdn.com/wikipetto/INzCWFMm_YlwlYMb/favicon.png?fit=max\u0026auto=format\u0026n=INzCWFMm_YlwlYMb\u0026q=85\u0026s=c885753c51d1e387b16145091d7f5210","dark":"https://mintcdn.com/wikipetto/INzCWFMm_YlwlYMb/favicon.png?fit=max\u0026auto=format\u0026n=INzCWFMm_YlwlYMb\u0026q=85\u0026s=c885753c51d1e387b16145091d7f5210"},"favicon":"https://mintcdn.com/wikipetto/INzCWFMm_YlwlYMb/favicon.png?fit=max\u0026auto=format\u0026n=INzCWFMm_YlwlYMb\u0026q=85\u0026s=c885753c51d1e387b16145091d7f5210","appearance":{"default":"dark","strict":true},"background":{"color":{"light":"#ffffff","dark":"#111214"}},"navbar":{"links":[{"href":"https://petto.sbs/support","label":"Support Server"}],"primary":{"type":"button","label":"Add Petto","href":"https://petto.sbs/invite"}},"footer":{"socials":{"discord":"https://petto.sbs/support"}},"seo":{"metatags":{"theme-color":"#111214","og:site_name":"wiki.petto.sbs","twitter:card":"summary_large_image"},"indexing":"navigable"},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","href":"overview/introduction"},{"language":"es","href":"es/overview/introduction"},{"language":"pt-BR","href":"pt-br/overview/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"wikipetto","hasAudioNarration":false,"actualSubdomain":"wikipetto","customDomains":["wiki.petto.sbs"],"gitSource":{"type":"github","owner":"pettobot","repo":"petto-wiki-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ae81e996e6e556c3ab64fca","collectionId":"2ffbed51-8c88-40d8-9e28-c350f89e2d0d","liveDeploymentHistoryId":"6ae81e996e6e556c3ab64fca","schemaVersion":"v3"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae8e2462fb019ec32ec24ca","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"en","tag":"Community","count":24},{"language":"es","tag":"Comunidad","count":24},{"language":"pt-BR","tag":"Comunidade","count":24},{"language":"en","tag":"Automation","count":20},{"language":"es","tag":"Automatización","count":20},{"language":"pt-BR","tag":"Automação","count":20},{"language":"en","tag":"Setup","count":13},{"language":"es","tag":"Configuración","count":13},{"language":"pt-BR","tag":"Configuração","count":13},{"language":"en","tag":"Moderation","count":11},{"language":"es","tag":"Moderación","count":11},{"language":"pt-BR","tag":"Moderação","count":11},{"language":"en","tag":"Miscellaneous","count":9},{"language":"es","tag":"Varios","count":9},{"language":"pt-BR","tag":"Diversos","count":9},{"language":"en","tag":"Members","count":8},{"language":"en","tag":"Onboarding","count":8},{"language":"es","tag":"Miembros","count":8},{"language":"es","tag":"Bienvenida","count":8},{"language":"pt-BR","tag":"Membros","count":8},{"language":"pt-BR","tag":"Boas-vindas","count":8},{"language":"en","tag":"Engagement","count":7},{"language":"en","tag":"Protection","count":7},{"language":"es","tag":"Participación","count":7},{"language":"es","tag":"Protección","count":7},{"language":"pt-BR","tag":"Engajamento","count":7},{"language":"pt-BR","tag":"Proteção","count":7},{"language":"en","tag":"Guides","count":6},{"language":"es","tag":"Guías","count":6},{"language":"pt-BR","tag":"Guias","count":6},{"language":"default","tag":"Changelog","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"automation/petto-code-generator","slug":"/automation/petto-code-generator","pageMetadata":{"title":"Petto Code Generator","description":"A free website that builds custom commands in Petto Code with forms, lets you try them in a test channel and gives you the command to paste.","icon":"wand-magic-sparkles","href":"/automation/petto-code-generator"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"A free website that builds custom commands in Petto Code with forms, lets you try them in a test channel and gives you the command to paste.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Frame,Heading,Note,OptimizedImage,Step,Steps,Tip}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Petto Code Generator`}),` is a website that writes `,_jsx(_components.a,{href:`/automation/petto-code`,children:`Petto Code`}),` for you. You pick what the command does with forms, try it in a channel that looks and works like Discord, and copy the command into your server.`]}),`\n`,_jsxs(_components.p,{children:[`Open it at `,_jsx(_components.strong,{children:_jsx(_components.a,{href:`https://codegen.petto.sbs`,children:`codegen.petto.sbs`})}),`. It is free and needs no login.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Nothing leaves the page.`}),` The generator never touches your server. Your commands only reach Discord when you paste the install command yourself.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Build it`,children:_jsxs(_components.p,{children:[`Open the `,_jsx(_components.strong,{children:`Builder`}),`. Start from one of the `,_jsx(_components.strong,{children:`21 recipes`}),`, from an official template, or from an empty command. Fill only the parts you need: the name, how it starts, the answer, buttons, a form, reactions, requirements and extras. Variables like `,_jsx(_components.code,{children:`{user}`}),` or `,_jsx(_components.code,{children:`{server}`}),` work anywhere. The code is written and checked while you go.`]})}),_jsx(Step,{title:`Try it`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Try it`}),` tab is a test channel that runs the command with `,_jsx(_components.strong,{children:`the real engine of Petto`}),`. Type the command, press its buttons, choose in its menus, fill its forms and react. You see what it would print and what it would do: roles given or taken, DMs, deleted messages, the stored data and a log of every use. You can switch between `,_jsx(_components.strong,{children:`two test people`}),` to try what someone else sees.`]})}),_jsxs(Step,{title:`Install it`,children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Install`}),` tab gives the `,_jsx(_components.code,{children:`!customcommand code`}),` command ready to paste in your server, and the `,_jsx(_components.code,{children:`!customcommand trigger`}),` command when it starts with its own prefix or words. It also gives a `,_jsx(_components.strong,{children:`share code`}),` (`,_jsx(_components.code,{children:`pc1.`}),`) for `,_jsx(_components.code,{children:`!customcommand import`}),`.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`customcommand`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` code`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` verify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {{ `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`customcommand`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` pc1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`code`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`verify`})]}),`\n`]})})}),_jsx(Frame,{caption:`In Discord: the install command pasted in a server; Petto checks the code and saves it.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/wikipetto/FghHti1ndnhhOsRU/images/discord/automation/petto-code-generator-install-code.webp?fit=max\u0026auto=format\u0026n=FghHti1ndnhhOsRU\u0026q=85\u0026s=7aea4fd581b469ed371f33f225293499`,alt:`liam pastes !customcommand code verify with the code in a block and Petto answers that verify was created`,\"data-og-width\":`1240`,width:`1240`,\"data-og-height\":`822`,height:`822`,\"data-path\":`images/discord/automation/petto-code-generator-install-code.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/wikipetto/FghHti1ndnhhOsRU/images/discord/automation/petto-code-generator-install-code.webp?w=280\u0026fit=max\u0026auto=format\u0026n=FghHti1ndnhhOsRU\u0026q=85\u0026s=7f2352f5cb5b26df0e588725e75a6810 280w, https://mintcdn.com/wikipetto/FghHti1ndnhhOsRU/images/discord/automation/petto-code-generator-install-code.webp?w=560\u0026fit=max\u0026auto=format\u0026n=FghHti1ndnhhOsRU\u0026q=85\u0026s=67874fc1e93ec1b255012ed154b225aa 560w, https://mintcdn.com/wikipetto/FghHti1ndnhhOsRU/images/discord/automation/petto-code-generator-install-code.webp?w=840\u0026fit=max\u0026auto=format\u0026n=FghHti1ndnhhOsRU\u0026q=85\u0026s=f9e1227f049e061c8d239af6f10b0616 840w, https://mintcdn.com/wikipetto/FghHti1ndnhhOsRU/images/discord/automation/petto-code-generator-install-code.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=FghHti1ndnhhOsRU\u0026q=85\u0026s=69a28a78e7320bd394e1ec610a92ab4f 1100w, https://mintcdn.com/wikipetto/FghHti1ndnhhOsRU/images/discord/automation/petto-code-generator-install-code.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=FghHti1ndnhhOsRU\u0026q=85\u0026s=f8faf41706abbda1271c8af741b3b53e 1650w, https://mintcdn.com/wikipetto/FghHti1ndnhhOsRU/images/discord/automation/petto-code-generator-install-code.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=FghHti1ndnhhOsRU\u0026q=85\u0026s=4802c285edd6a88e157092656545a633 2500w`})}),_jsx(Frame,{caption:`In Discord: the same command installed from its share code.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/wikipetto/FghHti1ndnhhOsRU/images/discord/automation/petto-code-generator-install-import.webp?fit=max\u0026auto=format\u0026n=FghHti1ndnhhOsRU\u0026q=85\u0026s=971ff1c897cf0496f04290ca2115ee19`,alt:`liam pastes !customcommand import with the pc1. share code and the name verify, and Petto answers that verify was imported`,\"data-og-width\":`1240`,width:`1240`,\"data-og-height\":`814`,height:`814`,\"data-path\":`images/discord/automation/petto-code-generator-install-import.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/wikipetto/FghHti1ndnhhOsRU/images/discord/automation/petto-code-generator-install-import.webp?w=280\u0026fit=max\u0026auto=format\u0026n=FghHti1ndnhhOsRU\u0026q=85\u0026s=e1350be2ab1b6cd896c0ec665622eb82 280w, https://mintcdn.com/wikipetto/FghHti1ndnhhOsRU/images/discord/automation/petto-code-generator-install-import.webp?w=560\u0026fit=max\u0026auto=format\u0026n=FghHti1ndnhhOsRU\u0026q=85\u0026s=c22b1d43d6288c7fdf6d6857bfcdac79 560w, https://mintcdn.com/wikipetto/FghHti1ndnhhOsRU/images/discord/automation/petto-code-generator-install-import.webp?w=840\u0026fit=max\u0026auto=format\u0026n=FghHti1ndnhhOsRU\u0026q=85\u0026s=5c10f462780bd7cd84097fce5047027a 840w, https://mintcdn.com/wikipetto/FghHti1ndnhhOsRU/images/discord/automation/petto-code-generator-install-import.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=FghHti1ndnhhOsRU\u0026q=85\u0026s=b49dfb75906c7e4e97678a1d54adb0f9 1100w, https://mintcdn.com/wikipetto/FghHti1ndnhhOsRU/images/discord/automation/petto-code-generator-install-import.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=FghHti1ndnhhOsRU\u0026q=85\u0026s=9e28f5080569b2b1375db09a7bca3e00 1650w, https://mintcdn.com/wikipetto/FghHti1ndnhhOsRU/images/discord/automation/petto-code-generator-install-import.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=FghHti1ndnhhOsRU\u0026q=85\u0026s=e5b8404e0512b001fb4f295bf5f9b608 2500w`})})]})]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Want to change something by hand? `,_jsx(_components.strong,{children:`Edit as code`}),` opens the command in the code editor, with colors, line numbers, a check on every key (with the line and the column of a mistake) and every function and piece of data ready to insert.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`what-it-can-build`,children:`What it can build`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Text and embeds`,icon:`message`,children:_jsx(_components.p,{children:`An answer in the channel, in a DM or in another channel, as text or an embed with fields, colors, images and the author.`})}),_jsx(Card,{title:`Buttons and menus`,icon:`hand-pointer`,children:_jsx(_components.p,{children:`Buttons and a dropdown menu that answer, give or take a role, or open a form. They can be locked to the person who used the command.`})}),_jsx(Card,{title:`Forms`,icon:`rectangle-list`,children:_jsx(_components.p,{children:`A pop-up form (modal) with text fields, menus of choices, radio buttons, checkboxes, pickers of members, roles and channels, files to upload and texts that inform. The answers go into a message, for example to a staff channel.`})}),_jsx(Card,{title:`Reactions`,icon:`face-smile`,children:_jsx(_components.p,{children:`Something that happens when people react: a role, a DM, an answer in the channel or a change to the message. A reaction can be only for the person who used the command.`})}),_jsx(Card,{title:`Roles`,icon:`user-tag`,children:_jsx(_components.p,{children:`Give, take or toggle a role from a command, a button, a menu option or a reaction.`})}),_jsx(Card,{title:`Counters and random answers`,icon:`dice`,children:_jsx(_components.p,{children:`A counter that goes up on every use or click, and an answer picked at random from a list.`})}),_jsx(Card,{title:`Cooldowns and requirements`,icon:`hourglass-half`,children:_jsx(_components.p,{children:`How often a command can be used, and which roles or channels it needs.`})}),_jsx(Card,{title:`Coins and rankings`,icon:`coins`,children:_jsx(_components.p,{children:`Stored data for each member: a daily reward, a balance and a leaderboard of the server.`})}),_jsx(Card,{title:`Triggers`,icon:`bolt`,children:_jsxs(_components.p,{children:[`Start with the prefix of Petto, with a prefix of its own (`,_jsx(_components.code,{children:`?hello`}),`), or with a message that starts with, is exactly or contains some words.`]})}),_jsx(Card,{title:`Recipes and templates`,icon:`book-open`,children:_jsx(_components.p,{children:`21 recipes (verification, role menu, reaction role, suggestions, reports, daily coins, leaderboard, requests by reaction and more) and every official template of the bot.`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`change-a-message-only-who-asked-and-closing-it`,children:`Change a message, only who asked, and closing it`}),`\n`,_jsxs(_components.p,{children:[`These make request cards and other messages that change over time possible `,_jsx(_components.strong,{children:`without writing code`}),`.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Some parts of the embed:`}),` when a button, a menu option or a reaction changes the message, it can keep the embed as it is (with everything the command wrote in it) and change only the parts you fill: a new `,_jsx(_components.strong,{children:`title`}),`, `,_jsx(_components.strong,{children:`description`}),`, `,_jsx(_components.strong,{children:`footer`}),` or `,_jsx(_components.strong,{children:`color`}),`. A part you leave empty stays.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Only who used the command:`}),` for each button and each reaction. Anyone else pressing the button is told `,_jsx(_components.em,{children:`This is not for you`}),`; anyone else’s reaction is taken away, with an optional DM like `,_jsx(_components.em,{children:`Only who asked can confirm it.`}),` A reaction knows who used the command because Petto remembers it with the message (`,_jsx(_components.code,{children:`.Message.CommandUserID`}),` in `,_jsx(_components.a,{href:`/automation/petto-code#who-used-the-command`,children:`Petto Code`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Close the message by its footer:`}),` when the footer of the embed says a word, like `,_jsx(_components.em,{children:`Delivered`}),`, its buttons, menus and reactions stop answering. A reaction is taken away, and a click gets an optional answer like `,_jsx(_components.em,{children:`This one is already closed.`})]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`recipe-requests-by-reaction`,children:`Recipe: Requests by reaction`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Requests by reaction`}),` recipe puts the three together. `,_jsx(_components.code,{children:`!req a cake`}),` sends a card with the request and deletes the message of the command:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`🦋 is for anyone and sets the footer to `,_jsxs(_components.em,{children:[`Claimed by `,_jsx(_components.code,{children:`{name}`})]}),`.`]}),`\n`,_jsxs(_components.li,{children:[`🎀 is `,_jsx(_components.strong,{children:`only for who asked`}),` and sets the footer to `,_jsx(_components.em,{children:`Delivered`}),`. Anyone else’s 🎀 is taken away.`]}),`\n`,_jsxs(_components.li,{children:[`Once the footer says `,_jsx(_components.em,{children:`Delivered`}),`, the card is closed and stops answering.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Open it in `,_jsx(_components.strong,{children:`Templates`}),`, change the texts and the emojis, try it in the test channel as two people, and install it.`]}),`\n`,_jsx(Frame,{caption:`In Discord: the Requests by reaction recipe installed and used with !req, run by Petto's engine.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/wikipetto/Z-XTVemdYTr1KRaH/images/discord/automation/petto-code-generator.webp?fit=max\u0026auto=format\u0026n=Z-XTVemdYTr1KRaH\u0026q=85\u0026s=3f79ad792ad6180759fce3f7d93daf8f`,alt:`The request card of chu for a cake for the server birthday, with the butterfly and bow reactions to claim it and confirm the delivery`,\"data-og-width\":`1240`,width:`1240`,\"data-og-height\":`514`,height:`514`,\"data-path\":`images/discord/automation/petto-code-generator.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/wikipetto/Z-XTVemdYTr1KRaH/images/discord/automation/petto-code-generator.webp?w=280\u0026fit=max\u0026auto=format\u0026n=Z-XTVemdYTr1KRaH\u0026q=85\u0026s=d528a20bfcec6bd75107575984bf6c42 280w, https://mintcdn.com/wikipetto/Z-XTVemdYTr1KRaH/images/discord/automation/petto-code-generator.webp?w=560\u0026fit=max\u0026auto=format\u0026n=Z-XTVemdYTr1KRaH\u0026q=85\u0026s=9ddf9930f2654a6efecc31d5cceacb14 560w, https://mintcdn.com/wikipetto/Z-XTVemdYTr1KRaH/images/discord/automation/petto-code-generator.webp?w=840\u0026fit=max\u0026auto=format\u0026n=Z-XTVemdYTr1KRaH\u0026q=85\u0026s=555b6084fc85ca4b36ae9d2fab817ac5 840w, https://mintcdn.com/wikipetto/Z-XTVemdYTr1KRaH/images/discord/automation/petto-code-generator.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=Z-XTVemdYTr1KRaH\u0026q=85\u0026s=18fb48c781653b4d841d2ea1fa842a16 1100w, https://mintcdn.com/wikipetto/Z-XTVemdYTr1KRaH/images/discord/automation/petto-code-generator.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=Z-XTVemdYTr1KRaH\u0026q=85\u0026s=4923a1706c66aa7f6ff291c6cbfa7bea 1650w, https://mintcdn.com/wikipetto/Z-XTVemdYTr1KRaH/images/discord/automation/petto-code-generator.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=Z-XTVemdYTr1KRaH\u0026q=85\u0026s=2ebcabfdf81fdd14f7f99dcf463f9eef 2500w`})}),`\n`,_jsx(Heading,{level:`2`,id:`share-codes-both-ways`,children:`Share codes, both ways`}),`\n`,_jsxs(_components.p,{children:[`A share code starts with `,_jsx(_components.code,{children:`pc1.`}),` and holds a whole command.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Out:`}),` the `,_jsx(_components.strong,{children:`Install`}),` tab gives the share code of your command. Anyone can use it in their server with `,_jsx(_components.code,{children:`!customcommand import \u003cshare code> [name]`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`In:`}),` paste a share code in the `,_jsx(_components.strong,{children:`Import`}),` tab to read its code and check it `,_jsx(_components.strong,{children:`before you use it`}),`. Then open it in the editor to change it. The whole line works too, with `,_jsx(_components.code,{children:`!customcommand import`}),` in front.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`A code from `,_jsx(_components.code,{children:`!customcommand export`}),` in Discord works in the generator, and a code from the generator works in Discord.`]}),`\n`,_jsx(Heading,{level:`2`,id:`my-commands`,children:`My commands`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`My commands`}),` keeps the commands you save `,_jsx(_components.strong,{children:`in your browser`}),`. You can export them as a JSON file and import them again on another device. Nothing is saved on a server.`]}),`\n`,_jsxs(_components.p,{children:[`The website is in `,_jsx(_components.strong,{children:`English, Spanish and Portuguese`}),`, with a light and a dark theme. The default texts of the commands follow the language you pick.`]}),`\n`,_jsx(Heading,{level:`2`,id:`same-engine-as-the-bot`,children:`Same engine as the bot`}),`\n`,_jsxs(Note,{children:[_jsxs(_components.p,{children:[`The generator runs `,_jsx(_components.strong,{children:`the same Petto Code engine as Petto`}),`, with the same checks, functions and limits (10,000 characters, 10,000 steps, 250 ms of running time, 25 reads and writes of stored data per use). `,_jsx(_components.strong,{children:`What works in the generator works in your server.`})]}),_jsxs(_components.p,{children:[`What it cannot test is what depends on Discord: the permissions of Petto in the channel, a role above Petto’s role or with moderation permissions, or someone with closed DMs. Petto checks those when the command runs. See `,_jsx(_components.a,{href:`/automation/petto-code#limits-and-safety`,children:`Limits and safety`}),`.`]})]}),`\n`,_jsxs(_components.p,{children:[`The full documentation of the language is at `,_jsx(_components.strong,{children:_jsx(_components.a,{href:`https://code.petto.sbs`,children:`code.petto.sbs`})}),`, with a page about the generator at `,_jsx(_components.a,{href:`https://code.petto.sbs/generator`,children:`code.petto.sbs/generator`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/automation/petto-code`,children:`Petto Code`}),` for the commands and `,_jsx(_components.a,{href:`/automation/custom-commands`,children:`Custom commands`}),` for plain text and embed commands.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Petto Code Generator","description":"A free website that builds custom commands in Petto Code with forms, lets you try them in a test channel and gives you the command to paste.","icon":"wand-magic-sparkles","href":"/automation/petto-code-generator"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"What it can build","slug":"what-it-can-build","depth":2,"children":[]},{"title":"Change a message, only who asked, and closing it","slug":"change-a-message-only-who-asked-and-closing-it","depth":2,"children":[{"title":"Recipe: Requests by reaction","slug":"recipe-requests-by-reaction","depth":3,"children":[]}]},{"title":"Share codes, both ways","slug":"share-codes-both-ways","depth":2,"children":[]},{"title":"My commands","slug":"my-commands","depth":2,"children":[]},{"title":"Same engine as the bot","slug":"same-engine-as-the-bot","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/wikipetto/c83e687cc7f8558b/scripts/make-og-image.js"],"subdomain":"wikipetto","siteName":"Petto","title":"Petto Code Generator - Petto","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/automation/petto-code-generator","matchLevel":0},"es":{"href":"/es/automation/petto-code-generator","matchLevel":1},"pt-BR":{"href":"/pt-br/automation/petto-code-generator","matchLevel":1}}},"lastModified":"2026-10-29T19:37:40.672Z","originalFileLocation":"automation/petto-code-generator.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"A free website that builds custom commands in Petto Code with forms, lets you try them in a test channel and gives you the command to paste.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Petto\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintcdn.com/wikipetto/INzCWFMm_YlwlYMb/favicon.png?fit=max\u0026amp;auto=format\u0026amp;n=INzCWFMm_YlwlYMb\u0026amp;q=85\u0026amp;s=c885753c51d1e387b16145091d7f5210\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintcdn.com/wikipetto/INzCWFMm_YlwlYMb/favicon.png?fit=max\u0026amp;auto=format\u0026amp;n=INzCWFMm_YlwlYMb\u0026amp;q=85\u0026amp;s=c885753c51d1e387b16145091d7f5210\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintcdn.com/wikipetto/INzCWFMm_YlwlYMb/favicon.png?fit=max\u0026amp;auto=format\u0026amp;n=INzCWFMm_YlwlYMb\u0026amp;q=85\u0026amp;s=c885753c51d1e387b16145091d7f5210\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/png\" href=\"https://mintcdn.com/wikipetto/INzCWFMm_YlwlYMb/favicon.png?fit=max\u0026amp;auto=format\u0026amp;n=INzCWFMm_YlwlYMb\u0026amp;q=85\u0026amp;s=c885753c51d1e387b16145091d7f5210\">\u003cmeta data-mint-head property=\"og:title\" content=\"Petto Code Generator - Petto\">\u003cmeta data-mint-head property=\"og:description\" content=\"A free website that builds custom commands in Petto Code with forms, lets you try them in a test channel and gives you the command to paste.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"wiki.petto.sbs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://wiki.petto.sbs/automation/petto-code-generator\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://wikipetto.mintlify.app/_mintlify/api/og/v2?division=Commands+%26+code\u0026amp;title=Petto+Code+Generator\u0026amp;description=A+free+website+that+builds+custom+commands+in+Petto+Code+with+forms%2C+lets+you+try+them+in+a+test+channel+and+gives+you+the+command+to+paste.\u0026amp;theme=bb8afea9878da8b85b43aaf1\u0026amp;signature=f68a51356efe1cc7784bcba2c9f3407c08dcded42d878246fcc2fa5d7b49ce1c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Petto Code Generator - Petto\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"A free website that builds custom commands in Petto Code with forms, lets you try them in a test channel and gives you the command to paste.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://wikipetto.mintlify.app/_mintlify/api/og/v2?division=Commands+%26+code\u0026amp;title=Petto+Code+Generator\u0026amp;description=A+free+website+that+builds+custom+commands+in+Petto+Code+with+forms%2C+lets+you+try+them+in+a+test+channel+and+gives+you+the+command+to+paste.\u0026amp;theme=bb8afea9878da8b85b43aaf1\u0026amp;signature=f68a51356efe1cc7784bcba2c9f3407c08dcded42d878246fcc2fa5d7b49ce1c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/wikipetto/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Petto\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#f0a88f\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#111214\">\u003clink data-mint-head rel=\"canonical\" href=\"https://wiki.petto.sbs/automation/petto-code-generator\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/automation/petto-code-generator.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://wiki.petto.sbs/automation/petto-code-generator\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://wiki.petto.sbs/es/automation/petto-code-generator\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://wiki.petto.sbs/pt-br/automation/petto-code-generator\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://wiki.petto.sbs/automation/petto-code-generator\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://wiki.petto.sbs/#organization\",\"name\":\"Petto\",\"url\":\"https://wiki.petto.sbs\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/wikipetto/INzCWFMm_YlwlYMb/favicon.png?fit=max\u0026auto=format\u0026n=INzCWFMm_YlwlYMb\u0026q=85\u0026s=c885753c51d1e387b16145091d7f5210\"}},{\"@type\":\"WebSite\",\"@id\":\"https://wiki.petto.sbs#website\",\"name\":\"Petto\",\"url\":\"https://wiki.petto.sbs\",\"publisher\":{\"@id\":\"https://wiki.petto.sbs/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://wiki.petto.sbs/automation/petto-code-generator#webpage\",\"url\":\"https://wiki.petto.sbs/automation/petto-code-generator\",\"name\":\"Petto Code Generator\",\"description\":\"A free website that builds custom commands in Petto Code with forms, lets you try them in a test channel and gives you the command to paste.\",\"dateModified\":\"2026-10-29T19:37:40.672Z\",\"isPartOf\":{\"@id\":\"https://wiki.petto.sbs#website\"},\"breadcrumb\":{\"@id\":\"https://wiki.petto.sbs/automation/petto-code-generator#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://wiki.petto.sbs/automation/petto-code-generator#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Automation\",\"item\":\"https://wiki.petto.sbs/automation/custom-commands\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Commands \u0026 code\",\"item\":\"https://wiki.petto.sbs/automation/custom-commands\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Petto Code Generator\",\"item\":\"https://wiki.petto.sbs/automation/petto-code-generator\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://wiki.petto.sbs/automation/petto-code-generator#article\",\"headline\":\"Petto Code Generator\",\"name\":\"Petto Code Generator\",\"description\":\"A free website that builds custom commands in Petto Code with forms, lets you try them in a test channel and gives you the command to paste.\",\"url\":\"https://wiki.petto.sbs/automation/petto-code-generator\",\"mainEntityOfPage\":{\"@id\":\"https://wiki.petto.sbs/automation/petto-code-generator#webpage\"},\"dateModified\":\"2026-10-29T19:37:40.672Z\",\"publisher\":{\"@id\":\"https://wiki.petto.sbs/#organization\"},\"isPartOf\":{\"@id\":\"https://wiki.petto.sbs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Petto\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Petto","nav":{"global":null,"languages":[{"language":"en","groups":[{"group":"Overview","pages":[{"title":"Introduction","icon":"book-open-reader","href":"/overview/introduction"},{"title":"Getting Started","icon":"rocket","href":"/overview/getting-started"},{"title":"Premium","icon":"gem","href":"/overview/premium"}]},{"group":"Guides","pages":[{"title":"Your First Server Setup","icon":"map","href":"/guides/first-server-setup"},{"title":"Saved Embeds Everywhere","icon":"palette","href":"/guides/saved-embeds-everywhere"},{"title":"Vanity \u0026 Server Tags","icon":"id-card","href":"/guides/vanity-tag-bot"},{"title":"Petto Vault","icon":"vault","href":"/guides/petto-vault"},{"title":"Setting Up a Ticket System","icon":"ticket","href":"/guides/ticket-system-setup"},{"title":"Migrating From Another Bot","icon":"route","href":"/guides/migrating-from-another-bot"}]},{"group":"Concepts","pages":[{"title":"Moderation Cases","icon":"folder-open","href":"/concepts/cases"},{"title":"How Variables Resolve","icon":"wand-magic-sparkles","href":"/concepts/variables-engine"},{"title":"Permissions \u0026 Role Hierarchy","icon":"sitemap","href":"/concepts/permissions-and-hierarchy"}]},{"group":"Moderation","pages":[{"group":"Commands \u0026 cases","icon":"gavel","expanded":false,"pages":[{"title":"Moderation","icon":"shield-check","href":"/moderation/moderation"},{"title":"Jail","icon":"lock","href":"/moderation/jail"}]},{"group":"Protection","icon":"shield-halved","expanded":false,"pages":[{"title":"Automod","icon":"shield-halved","href":"/moderation/automod"},{"title":"Anti-Nuke","icon":"bomb","href":"/moderation/anti-nuke"},{"title":"Anti scam","icon":"shield-exclamation","href":"/moderation/anti-scam"},{"title":"Honeypot","icon":"jar","href":"/moderation/honeypot"},{"title":"Lockdown","icon":"lock","href":"/moderation/lockdown"},{"title":"Security Center","icon":"shield-check","href":"/moderation/security"},{"title":"DMs from Petto","icon":"envelope","href":"/moderation/dms-from-petto"}]},{"group":"Appeals \u0026 logs","icon":"scroll","expanded":false,"pages":[{"title":"Appeals","icon":"scale-balanced","href":"/moderation/appeals"},{"title":"Logging","icon":"notebook","href":"/moderation/logging"}]}]},{"group":"Automation","pages":[{"group":"Commands \u0026 code","icon":"code","expanded":false,"pages":[{"title":"Custom Commands","icon":"square-terminal","href":"/automation/custom-commands"},{"title":"Petto Code","description":"Write custom commands in code: embeds, buttons, menus, forms, reactions, stored data and your own prefixes, checked before they are saved.","icon":"code","href":"/automation/petto-code"},{"title":"Petto Code Generator","icon":"wand-magic-sparkles","href":"/automation/petto-code-generator"},{"title":"Buttons and Panels","description":"Buttons and dropdown menus that give, take or toggle roles and answer in private, posted as panels, with no code.","icon":"hand-pointer","href":"/automation/button-responders"},{"title":"Disable Commands","icon":"ban","href":"/automation/disable-commands"}]},{"group":"Messages","icon":"message","expanded":false,"pages":[{"title":"Autoresponder","icon":"reply","href":"/automation/autoresponder"},{"title":"Sticky Messages","icon":"thumbtack","href":"/automation/sticky-messages"},{"title":"Auto Thread","icon":"comments","href":"/automation/autothread"},{"title":"Media channels","icon":"image","tag":"New","href":"/automation/media-channels"},{"title":"Timers","icon":"clock","href":"/automation/timers"}]},{"group":"Roles \u0026 reactions","icon":"face-smile","expanded":false,"pages":[{"title":"Reaction Roles","icon":"face-smile","href":"/automation/reaction-roles"},{"title":"Role Commands and Bulk Roles","icon":"users-gear","href":"/automation/role-commands"},{"title":"Reaction Triggers","icon":"face-smile","href":"/automation/reaction-triggers"},{"title":"Sticky Roles","icon":"user-tag","href":"/automation/sticky-roles"}]},{"group":"Boards","icon":"star","expanded":false,"pages":[{"title":"Starboard","icon":"star","href":"/automation/starboard"},{"title":"Monkeyboard","icon":"face-grin-tongue","tag":"New","href":"/automation/monkeyboard"},{"title":"Clownboard","icon":"face-grin-tears","tag":"New","href":"/automation/clownboard"}]},{"group":"Voice \u0026 alerts","icon":"bell","expanded":false,"pages":[{"title":"VoiceMaster","icon":"microphone","href":"/automation/voicemaster"},{"title":"Quest Alerts","icon":"trophy","href":"/automation/quests"},{"title":"Feeds","icon":"bell","href":"/automation/feeds"},{"title":"Rollout Alerts","icon":"flask","href":"/automation/rollouts"}]}]},{"group":"Community","pages":[{"group":"Tickets \u0026 forms","icon":"ticket","expanded":false,"pages":[{"title":"Tickets","icon":"ticket","href":"/community/tickets"},{"title":"Forum support","icon":"comments","href":"/community/forum-support"},{"title":"Forms","icon":"clipboard-list","href":"/community/forms"},{"title":"Reports","icon":"flag","href":"/community/reports"},{"title":"Requests","icon":"inbox","href":"/community/requests"}]},{"group":"Leveling \u0026 rewards","icon":"chart-line","expanded":false,"pages":[{"title":"Leveling","icon":"chart-line","href":"/community/leveling"},{"title":"Level Rewards","icon":"trophy","href":"/community/leveling-rewards"}]},{"group":"Giveaways","icon":"gift","expanded":false,"pages":[{"title":"Giveaways","icon":"gift","href":"/community/giveaways"},{"title":"Bonus-Entry Presets","icon":"star","href":"/community/giveaway-presets"}]},{"group":"Engagement","icon":"comments","expanded":false,"pages":[{"title":"Suggestions","icon":"lightbulb","tag":"New","href":"/community/suggestions"},{"title":"Confessions","icon":"mask","tag":"New","href":"/community/confessions"},{"title":"Polls","icon":"square-poll-vertical","href":"/community/polls"},{"title":"Counting","icon":"hashtag","tag":"New","href":"/community/counting"},{"title":"Message link embeds","icon":"link","href":"/community/message-link-embeds"},{"title":"Partners","icon":"handshake","href":"/community/partners"},{"title":"Uploads","icon":"cloud-arrow-up","href":"/community/uploads"}]},{"group":"Members","icon":"users","expanded":false,"pages":[{"title":"AFK","icon":"moon","href":"/community/afk"},{"title":"Birthdays","icon":"cake-candles","tag":"New","href":"/community/birthdays"},{"title":"Reminders","icon":"bell","href":"/community/reminders"},{"title":"Reputation","icon":"thumbs-up","href":"/community/reputation"},{"title":"Booster Roles","icon":"sparkles","href":"/community/boosterrole"},{"title":"Invites","icon":"user-plus","href":"/community/invites"},{"title":"Reviews and Profiles","icon":"star","href":"/community/reviews-profiles"},{"title":"Profile history","icon":"clock-rotate-left","tag":"New","href":"/community/profile-history"}]}]},{"group":"Roleplay","pages":[{"title":"Roleplay","icon":"heart","href":"/roleplay/roleplay"}]},{"group":"Miscellaneous","pages":[{"group":"Fun \u0026 images","icon":"dice","expanded":false,"pages":[{"title":"Fun","icon":"dice","href":"/miscellaneous/fun"},{"title":"Quotes and Images","icon":"image","href":"/miscellaneous/images"}]},{"group":"AI","icon":"robot","expanded":false,"pages":[{"title":"Ask (AI)","icon":"robot","tag":"BETA","href":"/miscellaneous/ask"}]},{"group":"Server tools","icon":"toolbox","expanded":false,"pages":[{"title":"Webhook","icon":"webhook","href":"/miscellaneous/webhook"},{"title":"Counters","icon":"chart-line","href":"/miscellaneous/counters"}]},{"group":"Petto","icon":"paw","expanded":false,"pages":[{"title":"Statistics","icon":"chart-simple","tag":"New","href":"/miscellaneous/statistics"},{"title":"Global Stats","icon":"chart-line","href":"/miscellaneous/global-stats"},{"title":"Votes","icon":"thumbs-up","href":"/miscellaneous/votes"},{"title":"Feedback Board","icon":"comments","href":"/miscellaneous/feedback"}]}]},{"group":"Onboarding","pages":[{"group":"Welcome \u0026 leave","icon":"door-open","expanded":false,"pages":[{"title":"Welcome Messages","icon":"hand-wave","href":"/onboarding/welcome"},{"title":"Leave Messages","icon":"door-open","href":"/onboarding/leave"},{"title":"DM on Join","icon":"envelope","href":"/onboarding/dm-on-join"},{"title":"Ping on Join","icon":"at","href":"/onboarding/ping-on-join"}]},{"group":"Roles \u0026 verification","icon":"user-check","expanded":false,"pages":[{"title":"Join Roles","icon":"user-plus","href":"/onboarding/join-roles"},{"title":"Verification","icon":"circle-check","href":"/onboarding/verification"}]},{"group":"Boosts \u0026 bumps","icon":"rocket","expanded":false,"pages":[{"title":"Boost Messages","icon":"sparkles","href":"/onboarding/boost"},{"title":"Bump Reminder","icon":"arrow-up","href":"/onboarding/bump-reminder"}]}]},{"group":"Setup","pages":[{"group":"Basics","icon":"sliders","expanded":false,"pages":[{"title":"Prefix","icon":"terminal","href":"/setup/prefix"},{"title":"Your own prefix","icon":"at","href":"/setup/user-prefix"},{"title":"Time","icon":"clock","href":"/setup/time"},{"title":"Language","icon":"language","href":"/setup/language"},{"title":"Aliases","icon":"link","href":"/setup/aliases"},{"title":"Short aliases","icon":"bolt","href":"/setup/short-aliases"}]},{"group":"Look","icon":"palette","expanded":false,"pages":[{"title":"Message Look","icon":"user-pen","href":"/setup/message-look"},{"title":"Bot Appearance","icon":"palette","href":"/setup/bot-appearance"},{"title":"Config Cards","icon":"sliders","href":"/setup/config-cards"}]},{"group":"Dashboard \u0026 access","icon":"lock","expanded":false,"pages":[{"title":"The dashboard","icon":"table-columns","href":"/setup/dashboard"},{"title":"Dashboard access","icon":"user-gear","href":"/setup/dashboard-access"},{"title":"Command permissions","icon":"key","href":"/setup/permissions"},{"title":"Config Export \u0026 Reset","icon":"download","href":"/setup/config-export"}]}]},{"group":"Resources","pages":[{"group":"Scripting","icon":"scroll","pages":[{"title":"Variables","icon":"signature","href":"/resources/scripting/variables"},{"title":"Embeds","icon":"code","href":"/resources/scripting/embeds"},{"title":"Pagination","icon":"book-open","href":"/resources/scripting/pagination"}]},{"title":"Image Cards","icon":"image","href":"/resources/image-cards"},{"title":"Info \u0026 Utility","icon":"magnifying-glass","href":"/resources/utility-commands"}]},{"group":"Common Issues","pages":[{"title":"FAQ","icon":"circle-question","href":"/common-issues/faq"},{"title":"Permission Issues","icon":"triangle-exclamation","href":"/common-issues/permissions"},{"title":"Dashboard Issues","icon":"browser","href":"/common-issues/dashboard-issues"}]},{"group":"Changelog","pages":[{"title":"Priority changelog","icon":"bullhorn","href":"/priority-changelog"},{"title":"Changelog","icon":"clock-rotate-left","mode":"wide","href":"/changelog"}]}]},{"language":"es","pages":[{"title":"es","href":"/es/automation/petto-code-generator"}]},{"language":"pt-BR","pages":[{"title":"pt-BR","href":"/pt-br/automation/petto-code-generator"}]}]},"basePath":"","title":"Petto Code Generator - Petto","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-DW6UFrUy.js","DynamicMarkdown-B62XqCSI.js","zoom-image-lightbox-eHyQ0tlO.js","lightbox-handle-r17bVUz3.js"]}