Перейти к основному содержимому

Console Channel Manifest

Configure Discord console channel

Manifest entry for console command execution from Discord. Allows executing server commands from a Discord channel.

Поля

ПолеТипПо умолчаниюОписание
enabledBooleantrueWhether console channel is enabled
discordChannelIdString—Discord channel ID for console commands
allowCommandsBooleantrueWhether to allow command execution from Discord
commandListList<String>—Commands that are allowed/blocked (depends on blacklistIsWhitelist)
blacklistIsWhitelistBooleanfalseIf true, commandList acts as whitelist. If false, acts as blacklist
blockBotsBooleantrueWhether to block commands from bots
allowedRolesList<String>emptyDiscord role IDs that are allowed to execute commands (empty = everyone)
logCommandsBooleantrueWhether to log command executions to file
logFilePathStringlogs/discord-console.logPath to command log file (relative to server root)

How to use it​

Anything a member types in the channel discordChannelId is run as a console command, so protect this channel. The bot from the Discord Link Manifest is required. Despite what the name may suggest, the entry does not stream console output to Discord.

warning

Restrict allowedRoles (empty means everyone who can write in the channel). Prefer blacklistIsWhitelist on, with only the commands you want in commandList. The check compares the first word of the message, so a blacklist cannot cover every way of writing a command.

  • With the default blacklist mode, the commands in commandList are refused (stop, restart and reload by default). In whitelist mode, only they are allowed.
  • blockBots ignores messages from other bots.
  • With logCommands, each command is appended to logFilePath with the time, the Discord ID and the name.
  • The bot reacts with a check on success, a cross on failure or missing role, and a no-entry sign on a refused command.