Skip to content

Petto v0.7.7

Choose a tag to compare

@github-actions github-actions released this 19 Oct 01:07
Immutable release. Only release title and notes can be modified.
6fdd356

Added

  • The everyday commands also work as slash commands. Not everyone uses the prefix, so 21 commands are now in Discord's / menu too, with the same answers as their prefix form (which keeps working): /help, /ping, /botinfo, /serverinfo, /userinfo, /avatar, /rank, /top, /remind, /afk, /suggest, /poll, /warn, /kick, /ban, /unban, /timeout, /purge, /channel (lock, unlock, slowmode...), /giveaway and /ticket. Their descriptions are in English, Spanish and Portuguese, the moderation ones are only shown to members with the permission they need, and none is offered in DMs. Petto now registers 64 commands (61 slash commands and 3 context menus); they are sent to Discord on the next start, and can take a moment to show (reloading Discord helps). Configuration and the rest of the commands stay prefix only.

  • /embed is a slash command too. create (opens the same editor, or saves a code), preview, send (with a channel option for text, announcement and voice channels and threads), list, delete, vars, edit title|description|color|author|footer|thumbnail|image|timestamp and field add|remove, the same as !embed, which keeps working. The saved embed is chosen from a list of the server's embeds while it is typed. Only shown to members with Manage Server, never in DMs, described in English, Spanish and Portuguese. Petto now registers 65 commands (62 slash commands and 3 context menus).

  • /help shows both ways of using a command. As a slash command the menu is private. The main page says how many commands also work with /, each category names the ones that do, a command's card shows its slash form next to the prefix syntax, and buttons open the dashboard (petto.sbs/dash), the docs (wiki.petto.sbs) and the support server.

  • Each form dresses its own web page. The page of a form (petto.sbs/form#…) now looks like the server's, the same way as the appeal site: the color of the form is the accent of the page (buttons, links, numbers), with an optional banner on top (an https link to a .png, .jpg, .gif or .webp picture, checked like the images of questions), a background (Petto's, a solid tint of the color or a gradient of it), and the icon and name of the server in the header (each can be hidden). The tab shows the icon of the server and "form · server" as its title, and the head of the form shows before the member logs in too. Set it with !form set <form> banner <link>|none, background default|solid|gradient, server-icon on|off and server-name on|off, or in the dashboard's new Web page section of the form editor, with a live preview. !form info shows the look and a link to share with a preview, petto.sbs/f/<id>: Discord and other apps show the title, the description and the banner (or the server icon) of the form, and a browser goes on to the page. A new bot route (look) gives the website only how a form looks, without a member. Needs schema.sql (four new columns on forms; existing forms keep the default look).

  • New counter types: role_online (the members of a role who are online, idle or busy: !counter create staffonline @Staff), tag_users (members wearing this server's tag), vanity_users (members a Vanity rule matches now, from the Vanity rules' records) and messages_today (messages of the day, from the activity stats, the day of Colombia like the other stats). The two read from the database are read at most once a minute per server, and only for servers that count them.

  • A better Counters page. Drag the counters (or use the arrows) to change their order, and Petto moves the channels in Discord to match: counters swap the places they hold inside their category, so nothing leaves its category or jumps past channels that are not counters. Click a counter's name to edit it in place with a live preview (Enter saves). Each counter says when it was last updated and when it updates next, and shows small problems the bot sees (no presences for an online count, a server too big to read every member, Discord asking to wait). A small line shows the members of the last 30 days: the counter job now saves the member count of every server once a day (one row per server and day, kept 90 days). Needs the new guild_member_days table and the position column of server_counters in schema.sql.

  • Counters in a category's name or a text channel's topic. !counter create <type> --kind category|topic|voice|text|stage (the dashboard has the same): category shows the value as a category's name, topic keeps a text channel's name and shows the value in its topic (up to 1,024 characters; a new one is a locked #server-stats channel, or --channel #general --kind topic uses one you have). Topic edits share the channel's budget of two edits every 10 minutes and the line of renames, like names. !counter edit #channel kind topic|name switches a text channel between the two. Needs the new target column of server_counters in schema.sql.

  • Counter milestone announcements (!counter announce). A message in a channel when the server reaches the goal of a goal counter, and if you want every N members (!counter announce every 100). The text takes {count} (members now), {goal} (the number reached) and {server}, or a saved embed with {counter.count}, {counter.goal} and {counter.server}. The last number announced is saved before the message goes out, so the same number is never announced twice: not after a restart, not when members leave and join again around it, and a raid of joins announces only the highest number passed. Turning it on starts from the members of that moment, without announcing what was already passed. !counter announce #channel [message], message, embed <name>|off, every <N>|off, goals on|off, on, off, test; the dashboard's Counters page has the same, with a preview. Needs the new counter_announce_config table in schema.sql.

  • Counter packs. !counter setup <pack> (also !counter preset <pack>) adds a ready category: basic (members, humans, bots), boosts (boosts, boosters, level), online (online, online now, in voice), goal [number] (a goal, by default the next round number above the members) and clock [time zone] (time and date). What the server already counts is skipped and the plan's limit is respected. The dashboard's Counters page has the same packs in a gallery, with the names they will show.

  • Restore only part of a backup. The dashboard's restore can bring back only some parts: roles, channels (with categories and permissions), server settings, emojis, stickers or AutoMod rules. Replace mode only deletes inside the parts chosen, so "only the channels" never deletes a role. The preview also says what the backup holds (roles, categories, channels, permission overwrites, emojis, stickers and AutoMod rules).

  • Live counters, rebuilt (!counter, prefix only). Channels whose name shows a live number, like the best counter bots:

    • More types: members, humans, bots, pending, online (any status) and online / idle / do not disturb (with the Presence intent Petto already has), members in voice, boosts, boosters, boost level, roles, channels, text / voice / announcement / stage channels, categories, emojis, stickers, the members of a role, a member goal (🎯 Goal: 480/500, with {goal}, {left}, {percent}; a set goal or the next round number), a clock and a date in any time zone, and countdowns to a timestamp. !counter types lists them with their value now.
    • Names you write: any text with {count} (and {role}, {tz}...), and a number format: plain 1234, grouped 1,234 (1.234 in Spanish and Portuguese) or compact 1.2k. New counters get a ready name in the server's language (👥 Members: 1,234). Old counters keep their names.
    • Setup: !counter setup makes a "📊 Server stats" category with members, humans and bots. !counter create <type> [name] [category] makes a locked voice channel (everyone sees it, nobody can join), or --channel #existing turns a channel you have into a counter; --format, --kind voice|text|category|stage, --role @Role, --goal 500, --timezone Europe/Madrid. !counter list shows what each one displays and any problem, !counter edit #channel <setting> <value>, !counter delete #channel [keep], !counter refresh. !counter add members voice still works.
    • Updates that respect Discord: a channel can be renamed twice every 10 minutes, and Petto never asks for more. A member joining or leaving, a boost, a new channel or role updates the counter at once when the budget allows; otherwise one rename is planned for the moment it is allowed again, with the value of that moment (everything in between is merged). Nothing is renamed when the name would not change. The renames are saved, so a restart keeps the budget; a rate limit from Discord pauses that channel.
    • Problems are said once: a deleted counter channel turns its counter off (shown in the list and the dashboard) instead of disappearing, and a missing Manage Channels permission is reported once to the server's notices and shown on the counter until it is fixed.
    • Free servers have 6 counters, Premium 25. Needs a few new columns of server_counters in schema.sql (applied on start). The dashboard has a new Counters page with live previews.
  • Forms can be filled on the website. Each form has a page at petto.sbs/f/<id>: the member logs in with Discord and sees the title, the description and every question (choices as buttons and checkboxes), checked the same way as in Discord. The answers go through the same pipeline as a Discord submission (requirements, review card, roles, DM, log, limits and retention), and the card says it was sent on the web. On by default; !form set <form> web off keeps a form in Discord only. !form panel ... --web yes adds a "Fill on the web" link button, and !form info and the dashboard show the link. Needs the new forms.web_enabled and form_submissions.source columns in schema.sql (applied on start).

  • Forms have one limit for every server, without Premium: 25 forms of 25 questions and 2,000 stored submissions (the cap and the retention cleanup stay). The texts no longer mention Premium.

  • More moderation commands, all prefix only (no new slash commands). Every one checks your permission, Petto's permission and the role hierarchy: nobody at or above you or Petto, never the owner.

    • !nickname (!nick, !rename): change or reset a nickname, or force one (!forcenick @member name, !forcenick list) that Petto puts back whenever it changes, also after they rejoin.
    • !stripstaff @member (Administrator): takes away every role with a staff permission at once, for a compromised staff account.
    • !imute / !iunmute and !rmute / !runmute: no files or embeds, or no reactions and external emojis, in every channel, while the member can still talk. The roles are made the first time, and new channels get them too.
    • !raid clean 10m [ban|kick] (!recentban): after a raid, bans or kicks everyone (not bots) who joined in that time, after a confirmation, with a case each and one summary in the log. !raid list 1h (!newmembers) shows who joined.
    • !clearinvites: deletes every invite of the server, after a confirmation.
    • !thread rename|lock|unlock|add|remove for threads and forum posts.
    • !restrictcommand <command> <role> (!rc): only members with one of the roles can use that command (as a prefix or a slash command). The owner and administrators always can. !rc list, !rc remove, !rc reset.
    • !role temp @member @role 3d (!temprole, !temprole list): a role that Petto takes away when the time is up. !role all @role for every member, bots included.
    • !ban list and !hardban list, !unbanall cancel (stops a mass unban that is running), !timeout list (!timeouts): who is timed out or has the mute role.
    • !note remove <id> and !note clear @member; !notes @member lists them.
    • !modstats @moderator (!case stats with a moderator), and the shortcuts !mhistory @moderator, !warnings @member, !caselog 12, !reason 12 new reason, !proof 12 (with a screenshot attached, or a link).
    • !topic, !nsfw (!naughty), !revokefiles off / !picperms @member (files and embeds for everyone, a role or a member), and !hide / !unhide for a role or a member, not only @everyone.
    • !drag @a @b [channel]: several members to a voice channel (yours by default).
    • !purge finds more: webhooks, stickers, emojis, reactions (removes the reactions and keeps the messages), starts_with, ends_with, before and after a message. The short forms of other bots work: !purge bots 50, !purge contains free nitro, !purge startswith !, !purge after <link>, !purge between <link> <link>. The amount is optional (100).
    • Anti-raid: !automod no-avatar on kicks or flags accounts that join without a profile picture, and !automod join-pass add <id> lets one account join once without the anti-raid checks stopping it. !antiraid works as !automod (!antiraid avatar, !antiraid newaccounts, !antiraid massjoin).
    • Needs the new forced_nicknames, temp_roles, command_restrictions and join_passes tables and a few new columns in schema.sql (applied at start).
  • Forms and applications (!form). Staff applications, partner requests, event sign-ups: a server makes forms of up to 25 questions (short text, paragraph, number, yes/no, one choice, several choices; required or not, with a placeholder, a help line and a length or number range). Members press the button (or pick the form in the menu) of a panel and answer in Discord forms of five questions each, with Next between the pages; a wrong answer (a number out of range) is offered again with what they wrote. Each form can ask for some roles, block others, ask for a minimum account age or time in the server, take one pending answer per member, make a member wait after a denial, stop after a number of answers per member or in all, and close on a date. What arrives is a card in the review channel with every answer (long ones are cut on the card and go whole in a file), the account age and join date, and Accept, Deny (with an optional reason) and Open thread. Accepting or denying gives and takes the roles the form names (roles above Petto or managed by an app are reported, never tried), sends the member a DM (the default text, the form's own text with {user}, {form}, {reason}, {number}, or a saved embed with the new {form.*} variables) and writes to the new forms log category. Reviewers are who manages the server or the reviewer roles of the form. Everything is a prefix command: !form create|delete|list|info|open|close|set|message|questions|panel|submissions|view|accept|deny|retention and !form question add|edit|move|remove, and !formconfig shows the card of the module. Every server has the same limits, with no Premium split: 25 forms of 25 questions and 2,000 stored submissions (when a server is full, its oldest reviewed submissions make room; pending ones are never deleted). The storage stays small: each submission is one JSON list of answers cut to Discord's limits, and once a day the answers of accepted, denied or cancelled submissions older than the server's retention (!form retention <days>, 30 days by default, 1 to 365) are removed, leaving a small row with the form, the member, the state, the reviewer, the dates and the link to the card. Needs the new forms, form_submissions, form_panels and form_config tables in schema.sql (applied on start). The dashboard has a Forms page with the same.

  • Anti-nuke: five new protections, all off until a server turns them on (!antinuke rule or the dashboard).

    • Anti Role Changes (role_update, 3 in 10s): roles edited in a row. A role (or @everyone) given a dangerous permission (Administrator, Manage Server, Manage Roles, Manage Channels, Manage Webhooks, Ban, Kick, Timeout, Mention Everyone) answers at once, without waiting for the limit. When it answers, the roles go back to how they were before the first edit.
    • Anti Channel Changes (channel_update, 4 in 10s): channels renamed or their permissions changed in a row. A channel opened to @everyone with Manage Channels, Manage Roles, Manage Webhooks, Manage Messages or Mention Everyone answers at once. The channels go back to their old name, topic and permissions.
    • Anti Mass Mention (mention_everyone, 2 in 30s): an account pinging @everyone or @here again and again. The pings are deleted. Bots that announce are left alone.
    • Anti Webhook Spam (webhook_spam, 8 in 10s): a webhook made by a person flooding messages. The webhook is deleted and the person answers. Webhooks of bots and apps (PluralKit, interactions, followed channels) are not touched, and with the protection off no webhook is looked up.
    • Anti Prune (prune, 1 in 60s): a member prune, read from the audit log entry itself.
  • Anti Server Changes now puts the server name and icon back when it answers, and says the old vanity (a bot cannot set it back).

  • Panic mode (!antinuke panic, off by default). When several protections act within a few minutes (2 in 10 min by default), or Anti Raid sees a raid, the server is locked down at once: the channels close and the invites are deleted and paused. The lockdown ends by itself (30 min by default), or earlier with !lockdown end or the dashboard.

  • Trusted admins and owner only (!antinuke admins, !antinuke settings). The owner can name trusted admins: the protections never touch them and they can change the anti-nuke. With owner only on, only the owner and the trusted admins can change the anti-nuke and press Restore (the administrators can still read it).

  • The owner gets a DM when a protection acts (on by default, once a minute at most; !antinuke settings dm_owner:false turns it off). The alert card also names the account and its ID.

  • More of what happens in a server is logged, in the categories that already exist (no new ones to set up).

    • messages: votes added or taken back in a poll, and a message published to the servers that follow an announcement channel.
    • invites: an invite link written in a message.
    • channels: the voice region, video quality and status of a voice channel, and the defaults and tags of a forum.
    • server: the boost progress bar, the invite and discovery backgrounds, the owner, the features, the widget and safety alert channels, who is interested in a scheduled event, and the changes of onboarding and the server guide.
    • emojis: the roles that can use an emoji. integrations: the permissions of the commands of an app.
    • sanctions: a case edited or deleted, all the cases of a member deleted, and a staff note added.
    • Petto now asks Discord for the poll events (the GuildMessagePolls intent, which needs no switch in the Developer Portal).
  • !serverinfo takes the ID of another server. !serverinfo 123456789012345678 tells about a server Petto is in, as long as you are a member of it.

  • Access to the dashboard by role (needs schema.sql). The dash_access table keeps which roles can open the dashboard of a server, all of it or some parts, to look or to change. The dashboard reads it.

  • Logs: !logs add takes all. !logs add #channel all sends every kind of event to that channel at once (the ones it already gets are kept), like the "everything to one channel" box of the dashboard.

  • A language for each server: English, Spanish and Brazilian Portuguese. Everything members and staff read can now be in English, Spanish (es, neutral Latin American) or Brazilian Portuguese (pt-BR): replies, cards, buttons, menus, forms, !help and the command descriptions it shows, usage cards and errors, default messages (welcome, level-up, giveaways, sanction DMs, bump, birthdays…), DMs a server sends (sanctions, transcripts, verification, giveaways — always in the server's language) and the server logs. English stays exactly as it was and is the default.

    • !language (alias !lang, Manage Server) shows the language of the server; !language es, !language pt-BR or !language en changes it at once. It is a prefix command only.
    • A server Petto joins for the first time starts in the language of its community (guild.preferredLocale: es-ES/es-419 → Spanish, pt-BR → Portuguese, anything else → English). Servers Petto already knew keep English until they use !language.
    • Outside a server (DMs that do not belong to one) Petto follows the member's Discord language.
    • Panels follow the language too. A panel is posted once and stays, so one posted before the server changed its language (or before this update) kept its old words. Setting a language with !language — also the one the server already has — or from the dashboard now redraws in place the VoiceMaster, ticket, verification, confession and honeypot panels and the running giveaways: the same message, buttons and ids, only the words change. !language says how many it redrew, and its card tells how to redraw old panels.
    • Command, subcommand and option names, variables like {user}, button ids, and anything a server wrote itself are never translated. The slash commands that are registered with Discord (roleplay, /setup, the Report menus) get their descriptions in Spanish and Portuguese too.
    • Also translated: the release notes of !version (written in the three languages in src/i18n/releases/; scripts/check-releases.js fails if a release is missing a language), the mistakes and ready-made templates of Petto Code, the notices Petto sends to a server's staff or owner (service, permissions, logging, review and diagnostic notices), the bot's web pages (verification, home, transcripts, errors) and the human messages of the dashboard API (in the language the dashboard asks for, ?lang= or x-petto-language, else the browser's or the server's), the titles of the generated !<command>config cards, the problems of the quest and rollout sources, the descriptions of the {quest.*} variables, and the place names of !weather (looked up in the server's language).
    • Still in English on purpose: names of commands, subcommands and options, {variables}, ids, URLs and emojis; anything a server wrote; the Petto team's own channels, alerts and operator commands (and the owner-only Premium actions); internal logs and the error codes of the dashboard API; Petto Code function names, keywords and what its built-in functions print (changing them would change servers' code); release codenames; the names of the AutoMod rules Petto creates in Discord (Petto finds them again by name); the bot's status, which is the same for every server; and data from Discord or other services.
    • Times like mañana a las 20:00, amanhã às 20:00, hoje à noite or em 2h are understood, and !rps takes piedra/papel/tijera and pedra/papel/tesoura.
    • Run schema.sql (column language in guilds, default en; it is already in the create table, the new alter table … add column if not exists covers older databases, and the bot also applies it on start).
    • For contributors: the texts live in src/i18n/locales/<language>/<module>.js (command descriptions in cmd.<category>.js, written from the builders by node scripts/i18n-commands.js <category>); t(lang, key, vars) and tn() for plurals. npm run check now runs scripts/check-i18n.js: the same keys, placeholders and Markdown in the three languages, no duplicated keys, Discord's length limits, and no English left written in the code (node scripts/find-hardcoded-text.js <files> lists it; a line that must stay English carries i18n-ignore; it reads object keys such as label, title, description, placeholder, text and footer, builder calls and template literals). scripts/check-i18n-panels.js draws every panel and button message in Spanish and Portuguese and fails on English words left in them.
  • The language shows where a server starts. !help lists the languages Petto speaks (and the one the server uses) and how to change it, the Configuration category of !help says it too, and the setup panel and the result of the quick setup have a Language line with !language.

  • More kinds of question in appeal forms, and files. Besides short and long answers, choices, yes or no and numbers, a form can ask a dropdown list, a rating scale (1 up to 3–10), a date, a link (http or https), a confirmation box and a file upload. A file question says what it takes (pictures, PDF, pictures or PDF, or also plain text) and how many files (1 to 5, up to 5 MB each). What is kept is decided by the bytes, not the name: a program or an archive with a picture name is refused, and pictures are re-drawn as PNG so only pixels are kept. Files are uploaded while the member fills the form and tied to the appeal when it is sent; the ones never sent are removed after a day. The staff read them on the card (up to 10 files, 8 MB, travel with the message) and in the dashboard, and the member in their appeal page. Run schema.sql (table appeal_files).

  • The appeal card of the staff is a Components V2 card with the member's picture, the state of the appeal, the punishments, every answer, the files, the invite and the buttons. Once the appeal is accepted, rejected or withdrawn the buttons stay but are locked (accept, reject and reply), and the card says who answered and when. A click on an old button now says the appeal was already answered.

  • {case.appeal} in the messages of a sanction (DM, reply and log): the link where the member can appeal, empty when the server has appeals off or the sanction cannot be appealed.

  • POST /internal/guild-language on the bot's web server, for the dashboard: after it saves guilds.language, it sends { "guildId": "<server id>", "language": "en" | "es" | "pt-BR" } with the usual X-Petto-Dashboard-Key header, and the bot uses the new language at once instead of after its 5 minute cache. Any other language code is refused with 400 invalid_language; the route only refreshes the cache and writes nothing.

  • PETTO_OPS_GUILD_ID (optional): the server where the private team controls work, !guildsend, !leaveguild and the buttons of the alerts, when it is not the support server. Without it nothing changes: the support server (PETTO_SUPPORT_GUILD_ID, or the server of the join-log channel when that is empty) is used. The support server keeps its other uses (boosters for !myprefix, Premium roles), and neither the operations server nor the support server can be targeted by !leaveguild or the notice controls.

  • PETTO_PREMIUM_LOG_CHANNEL_ID (optional): the channel of the team where Petto lists the Premium that is active each time it starts (the user, the plan, the slots, until when and whether it came from Polar or was given by hand), 45 seconds after it starts. It pings nobody and does nothing without the variable. It is a way to see that the subscriptions that Polar reported reached the database.

  • Forms: a description and a picture for each question. A question can have a longer text (up to 1,000 characters, with bold, italics and links) and an image (an https link to a .png, .jpg, .gif or .webp picture) that the web form shows over it; in Discord the help line or the start of the description is shown. !form question add and edit take description and image (none removes it).

  • Forms: a link preview of your own, and one address to share. The page of a form is now petto.sbs/form/<id> (/es/form/…, /pt-br/form/…), and that same link is the one to share: Discord and other apps show its preview. Each form can set that preview in the dashboard: a title (90 characters), a description (240), an image, the color of the side and whether the image is small; what is left empty uses the title, description, banner or server icon and color of the form. !form info and the panels use the new address; petto.sbs/form#<id> and petto.sbs/f/<id> still open the form. Needs schema.sql (five embed_* columns on forms).

  • The Honeypot from the dashboard. New bot routes let the dashboard's Honeypot page add a bait channel (or change its punishment), remove one, choose what is posted in it (Petto's panel, your own text or saved embed, or nothing) and post it again, with the same checks as !honeypot (Administrator, and Petto's permissions in the channel). The page lists the latest members caught; schema.sql adds an index for that list.

  • The dashboard can ask the bot to save its copy of the server now (POST /api/dashboard/guild/:guildId/resync), so a role or channel made a moment ago shows in the dashboard lists (the Sync server data button).

  • Logs can ignore a role. A role in the ignored list of the logs skips every member who has it, and !logs shows roles in that list as roles. The dashboard's people picker searches members by name (POST /api/dashboard/guild/:guildId/members/search).

Changed

  • A slash command names other commands the way they can be used. When a slash command points to a command that only has a prefix form (such as !embed create from /giveaway), it is written with the server's prefix instead of a / that would not work.

  • Free is generous and Premium is about twice as much, never more. Petto stays free for almost everything; Premium only adds room and small touches. Free → Premium per server: custom commands 125 → 250, autoresponders 75 → 150, ticket types 25 → 50, giveaway presets 15 → 30, image cards 30 → 60, uploaded card pictures 50 in 100 MB → 120 in 240 MB, partner channels 25 → 50, upload channels 100 → 200, button responders 250 → 500, button panels 50 → 100, counters 25 → 50. Premium servers keep every number they had; only Free went up. Autoresponders used to stop at 100 for every server whatever its plan; they now follow the plan like the rest. The messages that say how far Premium goes read the number from the limits instead of having it written in, so they can no longer disagree with them.

  • Level rewards and logging have no Premium limit. The Premium page listed "level rewards" (20, Premium 100) and "log routes" (20, Premium unlimited), but neither was ever counted anywhere: a server could always add a reward role for every level and send every log event where it wanted. Both are gone from the limits; they are free and unlimited, as they already were in practice.

  • 15 card fonts are free (were 5). Oswald, Playfair Display, Roboto Mono, Fredoka, Caveat, Anton, Lobster, Righteous, Bangers and Quicksand join Poppins, Inter, Montserrat, Bebas Neue and Nunito in the basic editor of image cards. Premium still has all 40 and the layer editor.

  • Ticket types and giveaway presets follow the plan in commands too. !ticket category add, the guided !ticket setup and !giveawaypreset create now stop at the same number as the dashboard (25 ticket types and 15 presets on Free, 50 and 30 on Premium) with the same message in English, Spanish and Portuguese: "This server already has N ...; Premium raises it to M." Before, only the dashboard counted them. The guided setup says how many types still fit before it creates anything.

  • New Premium touches for the web page of forms. Two animated backgrounds, aurora and waves (slow, only CSS, and still for visitors whose device asks for less motion), and hiding the small "Forms by Petto" line at the bottom of the page. Set them in the dashboard or with !form set <form> background aurora|waves and !form set <form> branding off. A server without Premium is told so; when Premium ends the page shows the plain gradient and the line again, and nothing else of the form changes. Needs schema.sql (the page_hide_branding column and the new background names).

  • The Counters page of the dashboard no longer waits for the bot to count. The live numbers, the names the channels have now and when they change next are counted from what Discord already sent to the bot (members, presences for the online counts, channels, roles), never asked from Discord on each page, and kept 30 seconds per server, so the page and the read it makes of itself right after are answered at once and a big server is not counted again on every visit. A change made from the dashboard and every rename of a counter forget them at once. The few values read from the database (Vanity members, messages today), the counters, the announcement and the limits are read at the same time instead of one after another, and the member behind a dashboard request is taken from the cache when the bot already has it.

  • The Forms page of the dashboard reads its submissions faster. The list, the pending counts, the storage and the retention are read at the same time instead of one after another.

  • Counter renames are spread over time. Every counter rename of the bot now goes through one small line: many counters changing at once (a raid in a big server, the clocks of every server at the same minute, a restart) go out one after another with a short, slightly random gap between any two and a longer one between two of the same server, instead of all at once against Discord's global and per-route limits. A counter already waiting in the line is not added twice; when its turn comes it shows the value of that moment. The budget of two renames per channel every 10 minutes is unchanged and still saved across restarts.

  • Form links carry the language and keep the id out of the address the server sees. A form on the website is now petto.sbs/form#x7Kp9QzA2mVt, petto.sbs/es/form#… or petto.sbs/pt-br/form#…, in the language of the server. !form info, !form relink and the Fill on the web button of panels use the new link; old petto.sbs/f/<id> links (and /es/f, /pt-br/f) still open the form.

  • Deciding a submission closes its thread. When a submission is accepted or denied (from Discord, !form or the dashboard), the thread Petto opened for it (the auto thread or Open thread) gets a last message with the result, the reason and who decided, and is locked and archived. Nobody is pinged; a thread that is gone is left alone.

  • Dashboard access by role works for Counters and Forms. Members who reach those pages through a role (not Manage Server) could open them but not use the actions that need the bot (setup, refresh, delete; accept, deny, panels). Now the website vouches for them on that page, and the bot checks the same rules and their roles itself before letting them in; a view-only role can only look.

  • Form links can no longer be guessed. A form on the website used to be petto.sbs/f/<number>, so anyone could try /f/1, /f/2... Now each form has its own random link, 12 letters and digits like petto.sbs/f/x7Kp9QzA2mVt, and the numbers no longer open a form on the web (commands and the dashboard keep using them). !form info and the Fill on the web button of panels use the new link. !form relink <form> (or !form set <form> link new) makes a new link and the old one stops working at once; panels posted before keep the old link, so post them again. Needs schema.sql: it gives every existing form its link.

  • Bulk moderation leaves alone the members you cannot moderate. ban users, kick users, mute users, mute remove-users, warn users (and massban, masskick...) only stopped where Discord itself refused before: now a member at or above your highest role or Petto's, the owner, Petto and yourself are left alone and listed as such.

  • !lock locks the channel you are in, like the other channel shortcuts. It used to open the lockdown status because the lockdown command had taken the name; the lockdown now answers to !lockdown, !raidmode and !raidstate.

  • !role add / !role remove say when Discord refuses instead of saying the roles were changed, refuse to change the roles of someone at or above you, and a mass role run (humans, has, all) reads every member first and shows how far it is. !role @member Role gives it, and give, take, rename, colour, kill work as in other bots.

  • !voice asks for the permission of each action (Mute Members for mute, Move Members for move...), not the three voice permissions at once.

  • A file sent with a prefix command fills its file option, so !case evidence 12 with a screenshot attached works.

  • The anti-nuke blames the right account more often, and never twice. When the audit log is late the bot reads it again a moment later instead of giving up, and an entry already blamed is never counted again (a single webhook created used to count once per webhook event). After a protection answers, what the same account does in that window is still undone, without a second alert.

  • The anti-nuke never acts on an account whose role is at or above Petto's, and a quarantine keeps the roles Discord manages (booster, integrations) instead of failing. Restoring rebuilds the roles before the channels and tries once more when Discord asks to slow down.

  • Vanity: the role goes when a member goes offline (you can change it), and a role with several rules is thanked once per source. Discord hides the Custom Status of a member who is offline or invisible, so until now Petto left their role as it was, and a role did not go away while someone was offline. Now it is a setting, and the default is to take the role away when Discord says the member went offline, and to give it back, thanking them again, when they are online with a matching status. !vanity offline keep|remove (and the dashboard) lets a server keep the role instead. A role the bot did not give is never taken away, and a sweep that has no presence for a member never strips their role. If the role is also managed by another rule (a name rule, or a Server Tag rule) that still matches, it stays. When several rules manage the same role the member is thanked once for each source (Vanity, Server Tag), not once for each rule. !vanity sync follows the same setting: with remove it asks Discord for the members with their presences and takes the role from those who are offline (if Discord is rate limited and it has to use the cache, offline members are left alone and the result says it is incomplete). Needs the new identity_settings table in schema.sql; without it everything uses the default.

  • The VoiceMaster buttons no longer fail when the bot is slow. Discord only waits 3 seconds for an answer to a button, a menu or a form, and a slow moment (Redis, the database or the host) made the answer arrive late: the member saw "This interaction failed" and the log got an "Unknown interaction" error. Now Discord is told at once that the answer is coming, and the answer is filled in after. A button that still comes too late is ignored quietly. The rename form is the only one that cannot be announced first.

  • The log of Discord says what the Cloudflare tunnel did while the bot was starting. The tunnel starts before the bot is connected to Discord, so its lines were only in the host console. The lines of the tunnel and every warning and error written before the log connects are now kept and said in it, and nothing else, so a normal start adds no noise.

  • /vanity notify and /guildtag notify list your saved embeds. While you type in the embed option, Discord shows the saved embeds of the server that match, so the name does not have to be written exactly.

  • The log says which slash commands were created, and why they were not. The commands are registered before the bot connects, when the log of Discord does not exist yet, so the result only reached the host console. Now, once the bot is connected, the log says how many commands are registered, which ones are new or gone, that nothing changed, or the reason Discord gave when it refused them.

  • !vanity and !guildtag also work as slash commands. The rules have several options, which are easier to fill in with the slash form than with the prefix. The prefix keeps working, with the short names !vy and !tag.

  • Backups are fuller, and you can delete them. A backup now also keeps the server description and language, the system channel options, the safety alerts channel, role icons, the tags and defaults of forum channels, voice regions, the stickers (the animated Lottie ones cannot be uploaded again) and the AutoMod rules, and a restore puts them back, with their own steps in the progress. Nothing about the people of the server is kept: no member list and no messages; the only IDs are the ones named in the permissions of a channel. Automatic backups were already off until someone turns them on; now !backup delete (or Delete backups in the menu) deletes one backup or all of them and the schedule, with a confirmation, and the dashboard has the same. The backups of a server Petto is no longer in are deleted 30 days after the last one.

  • Restoring a backup asks first, shows how far it is and can be stopped. Before anything changes, Petto shows what the restore would create, update and (in replace mode) delete, by name. Then it asks a human check: a picture with letters, like the verification. After that it saves a safety backup, restores while one message shows the progress with a Stop restore button, and says what it did. Only one restore runs at a time in a server. A stopped restore keeps what it already did and deletes nothing more, and replace mode deletes nothing at all if a role or channel could not be created or the restore was stopped. The channel it was started from is never deleted. The dashboard does the same through its own steps (preview, check, live progress, stop). The old one-click restore is closed.

  • The Premium list at start no longer repeats on every restart. When Petto starts it compares the list with the one already posted in the team channel: if it is the same it posts nothing, and if it changed it posts the new one and removes the old one.

  • Backups are under maintenance. For now !backup and its panel answer that backups are under maintenance, and the scheduled backups are not taken. The owner and the developers can still use them. The saved backups and the schedules are kept as they are. Setting BACKUPS_MAINTENANCE=off brings it all back. The dashboard page of backups shows the same notice.

Fixed

  • Every slash command showed twice (two /yes, two /help...). The commands were global, but copies registered per server were left from a time they were registered only in test servers (DISCORD_DEV_GUILD_ID): one scope never removed the other, and the server with a private command (/guilddebug) kept re-sending whatever it already had next to it. Now only one scope is used: on the first start with global commands, Petto removes its server-only commands from each server it is in, once, one server at a time and in the background (the log says where), and a server with a private command gets only that command. With DISCORD_DEV_GUILD_ID set the global commands are left alone and the log warns that every command shows twice there, so leave it empty in production. npm run deploy-commands does the same cleanup at once. The saved hash of the registered commands now includes the application and the scope, and a matching hash is checked against what Discord has, so a needed registration is never skipped.
  • Opening the dashboard of a server you are not a member of (the read-only view of the Petto developers) filled the error log with "Dashboard could not authorize cards for guild …: Unknown Member". Discord's Unknown Member and Unknown User answers now mean "no access" (403 no_access) without an error or a report, and the answer is remembered for a minute so the same page does not ask Discord again for each card.
  • A Vanity or Server Tag rule whose name had a space ("vanity 2") was refused, and the dashboard still said Saved. Spaces in a rule name now become dashes (vanity-2), from the dashboard and from the commands.
  • Appeals: the thread of an appeal closes with it. When an appeal is accepted, rejected or withdrawn, Petto locks and archives its thread, so nothing more is written there (it needs Manage Threads). The notice that the member cannot be messaged now says why: DMs closed, or no server in common with Petto. The answer is always on the appeal page.
  • Pictures of an appeal page uploaded from the device could look black: a picture with transparent parts and dark art was drawn over the dark page. A banner or link-preview picture with transparency now gets a plain background that contrasts with it (the icon keeps its transparency), and a picture that draws as all black is refused with an error instead of being stored.
  • The logs Petto sends through its webhooks carried the global name and picture of Petto even when the server gave Petto its own (the profile of the bot in that server, from the dashboard's Customize). They now use the name and picture of the bot in that server, and the global ones when the server gave none. A name with "discord" or "clyde" in it, which Discord refuses for a webhook, falls back to the global one.
  • Messages and commands no longer wait for the database to know the language of a server. Before, the language of each server was looked up when a message arrived and kept 5 minutes, and the event handler waited for that lookup before running any handler: one database round trip per server every 5 minutes on the path of a message, and more load on the database. Now one query loads the language of every server that does not use English when the bot is ready, it is refreshed every 5 minutes in the background while the known values keep being used, !language, the dashboard and joining a server update it at once, and the language is read once per message. node scripts/bench-i18n.js measures it (PETTO_ROOT=<checkout> compares another commit).
  • A slow database could make Petto answer in English: after 1 second without the server's language it fell back to English and did not keep the late answer. It now uses the last language it knew for the server, and the late answer fills the cache for the next message.
  • Texts the database keeps with an English default are shown in the server's language while nobody changed them: backup labels (Manual backup, Scheduled backup), the ticket form title (Ticket details), the appeal thread name and the first panel and ticket type of the ticket setup wizard (Support, General help).
  • The anti-alt check logged its own failures with a logger it never required, so a failure (a database error) became a ReferenceError instead of a log line.
  • The channel log tells what a new permission overwrite allows and denies (Added for @Mods: allowed View Channel; denied Send Messages), not only that it was added; several changes a few moments apart still come as one message.
  • scripts/check-log-events.js stopped halfway with code 0 (the grouped channel updates wait on timers that do not keep Node alive), so the checks of members, pins, stages, sounds, integrations, bots, command use and server settings never ran. It now waits for them, they pass, and the script fails if it ever ends before its last assertion.
  • DISCORD_DEV_GUILD_ID can hold several test servers separated by commas or spaces. With a list it used to send the whole text as one server id and Discord answered 400 guild_id is not snowflake, so the commands were not registered. Remember that with it set the commands are registered only in those servers and not globally: leave it empty in production.