Automations
A rule has three parts: when it fires, under what conditions and what to do. The bot runs it by itself: reminds the author, calls staff, closes the ticket on a button, gives a role. Rules are set up in the web panel, the “Automations” section.
Editor
On the left is a palette of all blocks with search and color groups: “When”, “If”, messages, ticket, member, integrations, time and logic. A block is added with a click (it goes after the selected step) or by dragging it onto any “+”. In the middle is the rule in one of two views: “Steps” — cards from top to bottom, “Diagram” — nodes on a canvas with “yes / else” branches (the wheel moves the canvas, Ctrl + wheel zooms). On the right are the settings of the selected step and the “up / down / copy / delete” buttons.
- •An unfilled step is highlighted in red even before saving; the “Need attention” counter leads to the first such step.
- •Esc clears the selection, Delete removes the selected step, Ctrl + Z / Ctrl + Y undo and redo an edit.
- •A step can be dragged onto any “+” — to another place in the list or into a “yes / else” branch. The “/” key is a quick block search.
- •“Versions” (in the rule properties, when nothing is selected): every save that changes the trigger, conditions, steps or name remembers the previous rule — the last 20, with who saved it. “Restore” rolls back; the current one also goes into versions.
- •“Copy” creates a disabled copy of the rule (its custom buttons get new keys). “Code” gives the rule's code for a day (if the rule hasn't changed — the same code, its term is extended); “New rule → Import by code” adds it on this or another server — disabled, and from another server without roles, channels and unknown categories. “Load from file” accepts a rule written by hand — the format is described on the “Rule format” page.
- •“Dry run on a ticket” shows what the rule would do (as it is in the editor now, even unsaved) with the chosen ticket: each step gets ✓ will run, ✗ won't pass, — won't be reached, ? the bot decides (the panel can't see members' roles), and when it would happen. Steps that change the ticket are taken into account further on: after “priority high” the next “if” already sees high. Nothing is executed.
- •In the rule list each rule has a chain of icons, runs over 14 days and errors over a week; the rule's journal shows which step didn't run and why.
- •A rule whose every step fails 10 runs in a row (a role or channel was deleted, the bot lacks permissions) turns itself off: the reason shows in the list and in the editor. Fix the step and turn the rule back on. Hitting limits and temporary Lolka failures don't count here.
When
| Trigger | Fires |
|---|---|
| Ticket opened | Right after a ticket is created. |
| First staff reply | The first message in the ticket not from the author — from Lolka or from the web panel. |
| Ticket claimed / unclaimed | By button, command, from the web, by a rule or by “first to reply claims”. |
| Ticket closed | In any way, including auto-close. Fires after the channel is archived. |
| Ticket reopened | By button, command, from the web or by a rule. |
| Rating given | The author rated the ticket after closing. Which rating — narrowed with a condition. |
| Custom button pressed | Someone pressed your button (see below). The ticket history shows who pressed it; if the rule closes the ticket, that person counts as the closer (so it goes into the staff stats). |
| Message in ticket | A live message in an open ticket — from the author, from staff or from anyone; it can be “contains text” (options separated by |) or a regex, and “only with an attachment” (a file, a picture). A member added to the ticket (/ticket add) counts as the author, not staff — the same in “Who the ticket is waiting for”, “Messages in ticket” and the “silent” timers. By default — once per ticket. |
| Priority changed | By command, from the web or by another rule; you can pick to which priority. |
| Moved to category | Escalation in any way; you can pick to which category. |
| The author left the server | For each of the author's open tickets — regardless of the “close if the author left” box. |
| Author role | The author got or lost one of the chosen roles — for each of their open tickets. The bot knows previous roles from the author's messages and actions; the very first change for an author who hasn't done anything yet may slip by. |
| Category rush | Open tickets in a category (the chosen one or any) went above N — fires on the ticket that crossed the threshold, once per rush. |
| Member added or removed | With /ticket add|remove, from the web panel or by a rule; you can pick added or removed. The member counts as the one who triggered it — you can give them a role or mention them. |
| Auto-close pause ended | The pause ran out or was lifted with /ticket resume. Checked once a minute, fires once. |
| A staff member left the server | For each open ticket they claimed: unclaim, transfer, call staff. |
| Custom command used | Someone sent your template in the ticket — with a prefix command or via /reply; you can specify which one. |
| Manually from the web panel | Doesn't fire by itself: a staff member runs the rule on a ticket — inbox, “⋯” → “Run a rule”. That staff member is the one who triggered it ({actor}, “claim for the presser”; in the ticket history and as the closer if the rule closes). Conditions are checked as usual; if they aren't met, nothing happens, and the panel says so. |
| Author is silent X | Staff wrote last, and the author hasn't replied for that long. |
| Staff is silent X | The author has been waiting for a reply that long (or nobody has written since opening). |
| Nobody claimed X | The ticket has been open and unclaimed that long. |
| Open longer than X | That much time has passed since opening, and the ticket is still open. Once per ticket. |
Time-based triggers are checked once a minute across open tickets; the minimum is 5 minutes. On one ticket such a rule fires once until the situation changes: the author replied and went silent again — the rule fires again. After a reopen, “silent” and “nobody claimed” start counting anew, and a new silence cancels the unfinished “Wait” and “Repeat” of this rule’s previous run on the ticket.
If
Optional conditions; all must be met.
| Condition | What it checks |
|---|---|
| Category | One of the chosen ones or not one of them. |
| Status | Open or closed; claimed or not; priority. |
| Author role | Has one of the roles or none of them. |
| Rating | No higher or no lower than N (👎 counts as 1, 👍 as 5). |
| Who the ticket is waiting for | Us (the author wrote last) or the author (staff wrote last). |
| Support hours | Whether it's working hours now (the category's or server's schedule; no schedule — always working hours). |
| Form answer | The answer to a question (matched by part of the question text) contains the given text. |
| Auto-close pause | Whether the ticket is paused. |
| Claimer role | The staff member who claimed the ticket has one of the roles or none of them. |
| Day and time | Weekdays and (optionally) an HH:MM window; the end before the start — a window across midnight, the end equal to the start — the whole day. The time zone comes from “Support hours”, Moscow by default. |
| Author's open tickets | At least or at most N, counting this one. |
| Messages in ticket | Live ones (not bots or events): all, the author's or staff's, at least or at most N. |
| Ticket open | More or less than the given time since opening. |
| Times reopened | At least or at most N times. |
| Author's time on the server | At most or at least N days since joining the server — for example, to be careful with new accounts. The author isn't on the server — not met. |
The “Test on tickets” block in the rule properties (nothing selected) shows how many open tickets the rule would match right now, without running anything — and recalculates itself while you change “When” and “If”. The author role, the claimer role and the author’s time on the server aren’t checked there.
Do
| Action | What it does |
|---|---|
| Post in the ticket | A message in the ticket channel, optionally with custom buttons. Placeholders: {user} — the author (with a ping), {staff} — the claimer (for a closed ticket nobody claimed — the staff member who closed it or the first to reply), {actor} — who triggered it (pressed a button, closed), {user_name} and {staff_name} — the same names without a ping, {support} — the ticket’s support roles (server and category, pings), {support_category} — the category’s roles (if there are none — all support roles), {priority} — the priority as a word, {age} — how long the ticket has been open (“2 h”), {rating} and {comment} — the rating and the review, {number}, {category}, {channel}, {voice} — the ticket’s voice channel (if created), {guild}, {answers} — all form answers (the “question” with the answer under it), {answer1}, {answer2}, {answer3}, {answer4}, {answer5} — the answer to a form question by number (mentions in answers don’t fire). Need a particular role — pick it in the “Ping roles” field of the “Post in the ticket” step or put <@&role ID> in the text. |
| Post in a channel | A message in any channel of the server, pinging the chosen roles. The same placeholders as “Post in the ticket”. A long text (for example, form answers) goes out as several messages, no more than three. |
| Add to the ticket / remove | Give or take away access to the ticket channel for roles and (with a box) whoever triggered the rule — for example, to call admins. Doesn't touch the author. |
| Webhook | A POST to an external service — JSON with the ticket data or a message for a Lolka channel webhook. Only https and public addresses. |
| Close the ticket | Like a normal close: transcript, logs, archive or channel deletion. The reason — your own or “Automation “name””. |
| Delete the channel | An open ticket is closed first. The transcript stays. |
| Priority | Low, medium or high. |
| Move to category | Like escalation: the channel moves, permissions follow the new category. |
| Claim for the presser | For a custom button and a manual run: the ticket is claimed by whoever pressed or ran it, if they're staff and the category allows claiming. |
| Give / take the author's role | The role must be below the bot's role. |
| Auto-close pause | For an hour, a day, a week, with no end, or lift the pause. |
| Ask for a rating | In a closed ticket — even if ratings are turned off in the settings. |
| Unclaim | The ticket is free again. |
| Reopen | A closed ticket whose channel stayed in the archive. |
| Rename the channel | Up to 100 characters, with placeholders. |
| Voice channel | A private voice channel for everyone in the ticket: access changes along with the ticket (a member added, claimed, moved — the voice channel follows the text one). You can pick the category, otherwise it goes where the ticket channel is. It's deleted when the ticket closes, by the “Delete voice channel” step or when everyone has left (after 5 minutes … a day, your choice). It isn't created twice — the link to it is in the {voice} placeholder. The bot needs the “Manage channels” permission. |
| Kick / ban / unban the author | Moderation through a ticket: for example, appeal approved → unban. |
| Reply from a template | A staff reply template from the “Commands” section — like /reply: text or an embed. {user} and {staff} in the template are whoever triggered the rule. |
| Mute the author / allow | The author sees the ticket but can't write — for a while (it lifts by itself, even if the rule is turned off) or until the “Allow writing” step. If a mute is already longer or without an end, the step doesn't shorten it. Doesn't touch staff and the owner. |
| Blacklist / remove | Like /blacklist add and remove: for an hour, a day, a week, 30 days or forever, with a reason. If the author is already on the list for longer or forever, the term and reason don't change. Doesn't touch staff and the owner. |
| Remove buttons | For “Custom button pressed”: removes the buttons from the message that was pressed — “Solved? Yes / No” won't be pressed a second time. |
| Wait | The following actions run after this time (up to 30 days). The wait survives a bot restart. If the rule was running on an open ticket and it got closed meanwhile, it doesn't go on; what was started on a closed ticket (for example, after a rating) continues. |
| Repeat | Every X, no more than N times (up to 10), while the condition holds. |
| If / else | Different actions depending on conditions. |
| Don't run further rules | Rules lower in the list for the same event won't fire — for example, a VIP rule sits above the general one and takes over the ticket. |
How “Repeat” works
The nested actions run right away, then every X — while the “while” condition holds. If the condition stops holding, the rule stops and goes no further. If the repeats run out, after X everything that comes after “Repeat” runs.
Example — the “Remind the author and close” template: the author is silent for a day → repeat once a day, no more than 2 times, while the ticket is waiting for the author: “is the question still relevant?” → close. The author replied — the reminders stop, and the ticket isn’t closed.
Webhook
The “JSON” format sends the event, the rule name, the server and the ticket (number, status, priority, category, author, claimer, rating) and a text field. The “Message” format sends {"content": "…"} — that’s what channel webhooks accept. Internal network addresses (localhost, 10.*, 192.168.* and the like) aren’t accepted, redirects aren’t followed, and the response is awaited for no more than 5 seconds. The webhook sends the ticket’s data (number, the author’s and staff member’s ids, category, rating) to the given address — the server admin is responsible for that address.
In “Post in the ticket” you can choose roles to ping. @everyone and @here from the rule text never ping.
Templates
“New rule” offers ready-made scenarios by topic. Templates that need a category or a role ask for them right away.
| Topic | Templates |
|---|---|
| Reminders and closing | Remind the author and close; close a ticket open for a week; the author left the server → close; delete the channel a day after closing; closed without a staff reply → delete the channel. |
| Staff and reply speed | Call staff if nobody claimed; an auto-reply outside working hours; remind the claimer that the author is waiting; not claimed in 2 hours → call a role into the ticket; an answer to a common question; a rush in a category → call support; reopened N times → high priority; weekends → warn that replies take longer. |
| Buttons in the ticket | “Solved” for the author; the author says thanks → offer to close; “I'll take it” for staff; “Create a voice channel” — a button for staff creates the ticket's voice channel. |
| Ratings | Rating given → delete the channel; a bad rating → report it; a 5 rating → to the reviews channel. |
| Access, roles and moderation | Appeal: approve → unban; application: accept → give a role; a VIP author → high priority; many open tickets → warn; the author has been on the server less than a day → ask for details. |
Custom buttons
Buttons with your label, emoji (including the server’s custom emoji) and color. Each one sets who can press it: the author, staff or everyone. Pressing does nothing by itself — the action is set by a “Custom button pressed” rule.
- •In the ticket's welcome message — category → “Buttons” → “Custom buttons”. They show as a second row while the ticket is open.
- •In a rule's message — the “Post in the ticket” action. For example, “Solved? Yes / No”.
Order and limits
- •Up to 25 rules per server, up to 10 actions per rule and in each branch.
- •Rules for the same event run from top to bottom — the order is changed with the arrows in the list.
- •Groups: rules from one template (for example, the “Solved” button and its closing) sit in the list as one block named after the template. Your own group is set with the “Group” field in the editor — pick an existing one or type a new one; an empty field takes the rule out of the group. A group has a shared switch and arrows — the block moves as a whole, rules inside move with their own arrows. The group goes along with the rule into a copy, code and backup; it doesn't affect how rules work.
- •A rule doesn't trigger itself. A chain “rule → event → another rule” stops at the second step — there are no endless loops. A rule with ban, kick, roles, access or blacklist steps isn't triggered by an event from another rule that has no such steps.
- •An error in one action (for example, no permission to give a role) doesn't stop the others.
- •If a rule does the same as a built-in server setting (auto-close, auto-delete, “close if the author left”, ratings, “first to reply claims”), the editor and templates warn you and link to the setting: with two mechanisms, the one with the shorter term fires. “Ask for a rating” won't ask a second time if ratings are already on or a rating was given.
- •A regex in “Message” is case-insensitive, with no more than one repeat (*, +, {n,m}) and a few alternatives (?, a|b): it's checked on every message, and a heavy pattern would slow the bot down.
- •Turned off or changed a rule — its pending “Wait” and “Repeat” are cancelled. Closed a ticket the rule was running on as open — same.
- •A guard against spam and overload: per server, no more than 60 rule runs and 120 actions a minute, webhooks — 20 a minute; the same event (the same button or the same message text) from one person on one ticket — no more than once every 5 seconds, a repeat is silently skipped; a channel is renamed no more than once every 5 minutes. Over the limit, the run or step is skipped, and the rule's journal shows “limit” (no more than one entry a minute).
- •Rules can be changed by server admins and staff roles with “edit” on “Automations” (Staff → “Web panel sections”); by default staff see rules without editing, and only the domain of a webhook address.
- •Ban, kick, unban, giving and taking roles and ticket access in rules can be added, turned on and changed (trigger, conditions) only by the server owner or a Lolka administrator — a “panel admin” from the settings can't: otherwise a rule would get around Lolka's own permissions. Importing settings from them brings such rules in turned off. The “Blacklist” and “Remove from blacklist” steps are added only by admins — staff don't change them, just like in the “Blacklist” section. Likewise only admins add “Webhook” and “Post in a channel”: these steps carry ticket text, private ones too, outside the ticket.
- •Who can press a custom button is checked against the button's settings, not against what the client sent.
- •Rules are included in moving settings with a code (Settings → “Transfer”). Roles and channels aren't moved to another server, and rules arrive turned off.
