Getting started
Invite Kharat Bot
- Open the invite link from the home page.
- Choose the Discord server you want to add the bot to.
- Review the permissions and approve the invite.
- Confirm that Kharat appears in the server member list.
The invite requests the bot and
applications.commands scopes. It also requests
Administrator by default so initial setup and moderation work
without hidden permission gaps. You can review the granted
permissions in Discord after the bot joins.
/help in a channel where the bot can read and
send messages. If slash commands do not appear immediately,
re-open Discord or check the server's command settings.
Required permissions
| Area | Useful permissions |
|---|---|
| Core | View Channels, Send Messages, Read Message History |
| Moderation | Ban Members, Kick Members, Moderate Members, Manage Roles |
| Tickets | Manage Channels, Manage Roles, View Channels, Send Messages, Read Message History, Attach Files, Embed Links |
| Logging | View Channel, Send Messages, Embed Links in the log channel |
| Security | Manage Messages, Moderate Members |
Open the dashboard
Use Sign in and continue with Discord. The dashboard lists servers where your Discord account has Administrator permission. If Kharat is not in one of those servers, the server card asks you to invite the bot first.
Check what is available
Use the Commands page for the generated
command list, or run /help in Discord. The command
reference shows command type, module, usage and permissions.
Commands and modules
Slash commands
Slash commands start with / and appear in Discord's
command menu. Tickets, logging, automation, security,
statistics and help are slash-only. Type / in a
channel and choose Kharat to see the registered commands.
Prefix commands
Prefix commands are limited to the moderation and utility
modules. The default prefix is ,. Examples:
,ping
,serverinfo
,avatar @member
,ban @member
,timeout @member 10m reason
Run ,prefix to show the current prefix. Run
,cgprefix <new-prefix> to change it, or edit
the prefix in the dashboard. Prefixes must be 1–5 characters
and cannot contain spaces.
Usage conventions
<required>means the argument is required.[optional]means the argument can be omitted.- Mention a member with
@namewhere the command asks for a member. - Durations use
s,m,hord, for example10mor2h.
Enable and disable modules
Administrators can disable the whole server, a module, or an individual command. The server, module and command switches are stored independently:
,disable module logging
,disable command ban
,enable module logging
,enable command ban
,disable server
,enable server
Disabling a module also disables every command in it. Enabling the module
again does not enable any command; enable each command you need explicitly.
The dashboard shows every command in a disabled module as off and requires
the module to be enabled before its command switches can be changed.
Module and command toggles are also available in the dashboard.
The enable and disable commands stay available
to administrators while a module or command is off. When the server itself
is disabled, only ,enable is processed.
Moderation
Moderation is a prefix module. Commands check both the caller's Discord permissions and the role hierarchy before acting.
| Command | What it does | Permission |
|---|---|---|
,ban @member | Bans a member | Ban Members |
,kick @member | Kicks a member | Kick Members |
,timeout @member 10m [reason] | Times a member out for up to 28 days | Moderate Members |
,unmute @member | Removes an active timeout | Moderate Members |
,gulag @member | Adds the configured gulag role | Manage Roles |
,forgive @member | Removes the configured gulag role | Manage Roles |
,gulagrole <role|id> | Saves the gulag role | Administrator |
,gulagchannelid <channel|id> | Saves the optional gulag log channel | Administrator |
,cgprefix <new-prefix> | Changes the server prefix | Administrator |
,enable / ,disable | Toggles the server, a module or a command | Administrator |
Role hierarchy
The bot cannot act on a member whose highest role is equal to or higher than the bot's highest role. The same rule applies to the person running the command. Move the Kharat role above the roles it needs to moderate.
Gulag behaviour
Configure the gulag role before using ,gulag or
,forgive. The role must still exist when the command
runs, and the bot must be allowed to manage it. Moderation actions
are written to the logging channel when logging is configured.
The dashboard's Moderation page can also update the prefix, the moderation module toggle, the gulag role and the optional gulag channel.
Tickets
Tickets are slash-only. The workflow uses one persistent panel and private channels created by the bot.
Configure tickets
- Open Dashboard → Tickets or prepare the settings in Discord.
- Choose an optional ticket category and ticket log channel.
- Select one or more support roles.
- Set how many open tickets each user may have (1–5).
- Run
/ticket panel [channel]to post or refresh the panel.
Only members with Manage Server or Administrator can post the panel. The panel is restored after a bot restart when its channel is still configured and available.
Using a ticket
- Click the panel button to open a private ticket.
- Duplicate open tickets are prevented according to the per-user limit.
/ticket closecloses the current ticket./ticket add @memberadds a member; the ticket creator or support staff can use it./ticket remove @memberremoves a member; only support staff can use it./ticket infoshows the ticket number, status, creator and opening information.- Close, reopen and delete controls are available inside the ticket channel.
Transcripts and limits
When a ticket is deleted, the bot can send a transcript to the configured ticket log channel. Transcripts are capped at 500 messages. On startup, the bot reconciles open tickets and can refresh configured panels; recovery checks the first 200 open tickets.
Logging
Logging is slash-only and requires Manage Server or Administrator. Set a log channel and choose which events are recorded.
/logging channel [#channel]
/logging toggle event:<event> enabled:true
/logging status
/logging test
Loggable events in the current release:
- Message deleted
- Message edited
- Channel created
- Channel deleted
- Role created
- Role deleted
- Member banned
- Member unbanned
- Ticket opened
- Ticket closed
- Ticket reopened
- Moderation action
Use /logging test to confirm the bot can send to the
configured channel. Clear the channel with
/logging channel and no channel to disable logging.
Automation
Automation provides exact-match keyword auto responses. It is slash-only and requires Manage Server or Administrator.
/automation add trigger:hello response:Welcome!
/automation list
/automation toggle trigger:hello enabled:false
/automation remove trigger:hello
- Up to 20 auto responses per server.
- Matching is case-insensitive and uses the complete message text.
- Each trigger has a short cooldown to avoid reply loops.
- Disable the automation module or an individual response to stop it.
The dashboard's Automation page provides the same list, add, toggle and remove actions.
Security
Security is slash-only and requires Manage Server or Administrator. Two protections are available.
/security status
/security antiinvite enabled:true
/security antispam enabled:true threshold:5 window:5 timeout:60
/security exemptrole action:add role:@Trusted
/security exemptchannel action:add channel:#mod-log
| Setting | Behaviour |
|---|---|
| Invite filtering | Deletes messages containing Discord invite links and sends a short warning. |
| Spam protection | Times out members who send too many messages inside a window. |
| Exempt roles | Members with an exempt role bypass security checks. |
| Exempt channels | Messages in exempt channels bypass security checks. |
Anti-spam accepts a threshold of 3–30 messages, a window of 2–60 seconds, and a timeout of 10–86400 seconds. Members with Administrator, Manage Messages or Manage Guild bypass the checks. The dashboard's Security page can change the same settings.
Server statistics
Server statistics
Use /stats to show member count, boosts, roles,
text and voice channel counts, categories, open and closed
tickets, bot uptime, owner and server ID.
The dashboard also has a dedicated ServerStat
control center. It is separate from the /stats
command: configure statistic counters and activity roles there
even when the command itself is disabled.
Statistic channels
ServerStat keeps selected voice-channel names in sync with real
server values. Each counter has a statistic type, target voice
channel, label, emoji, optional prefix and suffix, and a name
template. The template supports {emoji},
{label} and {value}. A live preview
distinguishes example values from synchronized server values.
Channel updates follow the configured interval, which starts at 10 minutes to respect Discord's rename limits. The bot needs Manage Channels on every target channel. Removing a statistic from the dashboard does not delete the Discord channel.
Activity roles
Activity rules award a role when a member reaches a threshold within a 1-90 day window. Supported activity types are messages, voice minutes and active days. Activity is stored as daily aggregate counts only; message content is never stored. Ignore staff channels or roles from Dashboard → ServerStat Settings.
The bot needs Manage Roles and a role position above every role it awards. Removing a rule does not remove roles already awarded. Activity tracking, message tracking and voice tracking can be paused independently from the module switch.
Utility toolkit
The Utility module provides a comprehensive suite of everyday Discord tools,
including message recovery (snipe), persistent reminders, server and member lookups,
safe math calculation, and text transformation. Prefix commands are the primary
interface (using default prefix ,), with slash commands where appropriate.
Message recovery (snipe)
Recover recently deleted messages, edits, and removed reactions in the channel. Snipe records are stored in a secure, bounded memory cache with automatic 24-hour expiration.
,snipe [index|@member]
,editsnipe [index|@member]
,reactionsnipe [index]
,snipehistory [limit]
,snipeclear
,snipeclear requires the Manage Messages or Administrator permission.
Persistent reminders
Set reliable reminders with natural duration syntax. Reminders persist in the database, survive bot restarts, and deliver automatically with channel or DM fallback.
,remindme 30m do the laundry
,remindme 2h30m check the oven
,reminders
,remindcancel <id>
,remindedit <id> <new-message>
,remindclear
User and server lookups
Inspect member roles, permissions, avatars, banners, and server configuration.
,userinfo [@member|id]
,serveravatar [@member]
,banner [@member]
,roleinfo <@role|name|id>
,permissions [@member]
,membercount
,serverinfo
,channelinfo [#channel]
,boostinfo
,inviteinfo <code|url>
,botinfo
,ping
Text, formatting, and calculators
Lightweight tools for mathematical evaluation, encoding, timestamps, and dice rolling.
Calculations use a strict mathematical tokenizer and AST parser without eval().
,calculate 2^8 + sqrt(144)
,charactercount <text>
,reverse <text>
,binary <encode|decode|text>
,base64 <encode|decode|text>
,unicode <characters>
,timestamp [time/duration]
,poll "Question" "Option 1" "Option 2"
,choose <a, b, c>
,roll [2d6|100]
,randomnumber [min] [max]
,color <hex|rgb|random>
,enlargeemoji <emoji>
,time <timezone>
,timediff <date1> and <date2>
,firstmessage [#channel]
,channelid [#channel]
,roleid <@role|name>
,threadinfo [#thread]
,permalink <message-id>
Invite Tracker submodule
Track server invites, join sources, vanity URL usage, and member referral leaderboards. Features real-time join attribution, member leave tracking with net calculations (Regular - Leaves + Bonus - Fake), and suspicious account detection (accounts younger than 3 days flagged as fake).
,invites [@member|id]
,inviter [@member|id]
,inviteleaderboard [limit]
,inviteconfig channel #invites-log
,inviteconfig bonus @member 5
,inviteconfig status
,invitesync
,inviteconfig and ,invitesync require the Manage Server or Administrator permission.
The invite tracking cache initializes automatically on bot startup and resynchronizes differentials on invite creation or deletion events.
Dashboard
Signing in
Open Sign in and continue with Discord. Kharat uses Discord OAuth to read your user profile and the servers where your account has Administrator permission. The dashboard does not ask for your Discord password.
Which servers appear
Only servers where your Discord account has Administrator permission are listed. If Kharat is not in a server, the server card shows an invite action. Clicking a server without the bot opens the invite prompt instead of the configuration pages.
What you can configure
- Settings: server availability, prefix and module toggles.
- Moderation: prefix, module toggle, gulag role and gulag channel.
- Commands: module and individual command toggles.
- Tickets: category, log channel, support roles and per-user ticket limit.
- Logging: log channel and event toggles.
- Automation: auto response list and controls.
- Security: invite filtering, anti-spam and exemptions.
How saves work
The dashboard sends changes to the bot over an authenticated WebSocket. The bot validates and persists the change, then acknowledges it. The dashboard refreshes only after that acknowledgement. If the bot is disconnected, save buttons are disabled and the page explains that configuration is unavailable.
Troubleshooting
The bot is not responding
- Confirm Kharat is online and present in the server.
- Check that the server, module and command are enabled.
- Try
/helpfirst. If slash commands work but prefix commands do not, check the prefix with,prefix. - Confirm the bot can view the channel and send messages.
Slash commands are missing
- Re-open Discord after the bot joins so the command list refreshes.
- Check the server's command settings for Kharat.
- If the bot was invited without the
applications.commandsscope, re-invite it using the current invite link.
Insufficient permissions or role hierarchy
- Give the bot the permission required by the command.
- Move the Kharat role above the roles it needs to manage or moderate.
- Remember that the caller and the bot both need to outrank the target for moderation actions.
Ticket creation fails
- Check Manage Channels, Manage Roles and View Channels.
- Verify the configured category still exists.
- Check the per-user open ticket limit.
- Confirm the support roles still exist and can be assigned.
Dashboard login or server access
- Only servers where you have Administrator appear.
- Sign out and sign in again after a permission change.
- If a server has no Kharat, use its invite action first.
Configuration changes do not apply
- Check the bot connection banner on the dashboard.
- Retry once the bot is connected. Offline saves are rejected rather than queued.
- A slow acknowledgement can time out even when the bot saved the change; refresh the page before retrying.
FAQ
Is Kharat Bot free?
Yes. The features documented here do not require a paid plan.
Does the bot need Administrator?
The default invite requests Administrator for setup convenience. You can review the granted permissions in Discord. Some features, such as moderation and ticket management, still need their specific permissions and a correctly ordered bot role.
Can I use prefix commands for tickets or logging?
No. Only moderation and utility commands have prefix versions. Tickets, logging, automation, security, statistics and help are slash-only.
Where is the command list?
Use the Commands page or run
/help in Discord.
Where do I report a problem?
See the Support page. Include the command, expected behaviour, actual behaviour and relevant permissions. Never send tokens or other secrets.