import{_ as t,o,c as a,ag as r}from"./chunks/framework.DXGyWiRo.js";const p=JSON.parse('{"title":"Bot Access Control","description":"","frontmatter":{},"headers":[],"relativePath":"getting-started/access.md","filePath":"getting-started/access.md","lastUpdated":1776332711000}'),s={name:"getting-started/access.md"};function l(n,e,i,c,d,h){return o(),a("div",null,[...e[0]||(e[0]=[r('
Memoh uses an ACL (Access Control List) system to control who can interact with your bot. You can define prioritized rules to allow or deny specific users, channel identities, or entire channel types — all from the bot's Access tab.
When you create a bot, Memoh lets you start from an ACL preset. Presets are just a shortcut for common access patterns.
| Preset | Result |
|---|---|
allow_all | Default effect is allow; anyone can chat unless you add deny rules later |
private_only | Default effect is deny; private conversations are allowed |
group_only | Default effect is deny; group conversations are allowed |
group_and_thread_only | Default effect is deny; groups and threads are allowed |
deny_all | Default effect is deny; nobody except the owner/admin path can chat until you add allow rules |
These presets only define the starting point. After creation, you can refine everything from the Access tab.
Each bot has a default effect (allow or deny) that applies when no ACL rule matches an incoming message. Configure this from the bot's Access tab.
ACL rules can target three kinds of subjects:
| Subject | Description |
|---|---|
| All | Matches every incoming message regardless of sender. Use this for global allow/deny rules. |
| Channel Identity | A specific identity on an external channel (e.g., a Telegram user, a Discord member). Useful for controlling access at the individual level. |
| Channel Type | An entire channel platform (e.g., all Telegram users, all Discord users). Useful for platform-level access control. |
Each rule has an effect:
Rules are evaluated in priority order (top to bottom). The first matching rule determines the outcome:
This means rule ordering matters. A deny rule placed above an allow rule will take precedence for matching subjects.
Open a bot's Access tab to configure its access control.
Recommended workflow:
allow or deny.private, group, or thread.Rules can be drag-and-dropped to change their priority. Higher rules (closer to the top) are evaluated first. After reordering, click Save to persist the new order.
Source scope lets you create fine-grained rules. For example:
Scope fields form a hierarchy: Channel → Conversation Type → Conversation ID → Thread ID. Each level is optional, but a Thread ID requires a Conversation ID.
This is the most useful mental model:
allow_all is best for open bots and public demos.private_only is best when the bot should only answer in direct chats.group_only is best for bots intended to live only in shared rooms.group_and_thread_only is best for bots that should work in group spaces and threaded sub-conversations, but not in private DMs.deny_all is best for highly restricted bots where you want to add every allow rule manually.If you are unsure, start with allow_all for a personal test bot or deny_all for anything sensitive.
allow_all, or set ACL Default Effect to allow.deny_all, or set ACL Default Effect to deny.allow_all, or set ACL Default Effect to allow.deny_all or private_only, depending on your goal.telegram.When ACL behavior is confusing, use:
/access slash command to inspect the current identity, role, and ACL evaluation contextThis is especially helpful when a user is linked across multiple channels or when group/thread scoping is involved.
',58)])])}const g=t(s,[["render",l]]);export{p as __pageData,g as default};