LogoRobo.js

Configuration

Plugin options, required intents, and bot permissions

Configure the moderation plugin through a config file, the /mod setup command, and your Discord Developer Portal settings.

Plugin options

Create config/plugins/robojs/moderation.mjs to set plugin-level options:

config/plugins/robojs/moderation.mjs
export default {
  deletePolls: true
}
config/plugins/robojs/moderation.mjs
export default {
  deletePolls: true
}

Option reference

OptionTypeDefaultDescription
deletePollsbooleanfalseAutomatically delete any message containing a Discord poll

When deletePolls is enabled, the plugin listens to raw MESSAGE_CREATE events and deletes messages with polls before Discord.js processes them.

Per-guild settings

Runtime settings are configured through /mod setup and persisted across restarts. These are not set in the config file.

SettingDescription
Moderator Logs ChannelChannel where all moderation actions are logged
Moderator Mail ChannelChannel where user reports are sent
Test ModeSimulate moderation actions without executing them
Require ConfirmationShow a confirmation modal before destructive actions
Lockdown ModeBlock all commands for non-moderators

See Moderation Channels and Lockdown Mode for details on these features.

Required intents

The plugin automatically registers these Discord gateway intents when installed:

IntentPurpose
GuildsAccess guild and channel data
GuildBansDetect ban/unban events
GuildMessagesMonitor messages for rules enforcement
GuildModerationAccess moderation events
MessageContentRead message content for rules enforcement
DirectMessagesSend DMs to users who haven't accepted rules
AutoModerationConfigurationAutoMod configuration events
AutoModerationExecutionAutoMod execution events

MessageContent is a privileged intent. Enable it in the Discord Developer Portal under your application's Bot settings. Without it, the rules enforcement feature cannot read message content to determine if a user has accepted the rules.

Required bot permissions

The plugin requests these permissions when generating invite links:

PermissionUsed by
BanMembers/mod ban, Ban/Unban buttons
KickMembers/mod kick
ModerateMembers/mod timeout, /mod warn, /mod audit, /mod setup
ManageChannelsCreating moderator log and mail channels
ManageMessagesPoll deletion, message cleanup on kick, rules enforcement
ManageRolesAssigning the member role on rules acceptance
ReadMessageHistoryAudit commands, message scanning
ViewChannelChannel access for logging and reports
ViewAuditLogAccessing Discord's audit log

Data persistence

The plugin stores data using two mechanisms:

Robo State (guild settings)

Per-guild settings (channels, mode toggles) are stored via Robo's setState with persist: true. The state key is settings in namespace plugin-modtools:<guildId>.

Flashcore (user data)

User-specific data is stored via Flashcore:

KeyNamespaceDataDescription
banplugin-modtools:<guildId><userId>{ reason?: string }Ban reason for a user
infractions<guildId><userId>numberWarning/strike count
rules-title<guildId>stringRules embed title
rules-rules<guildId>stringRules embed content
rules-imageurl<guildId>stringRules embed image URL
member-role<guildId>stringRole name granted on rules acceptance
rules-channel<guildId>stringChannel ID where rules were posted

This data persists across restarts. Changing your Flashcore adapter (e.g., to a database) carries this data with it.

Next Steps

On this page