By linking this plugin with a Discord bot, you can send commands and chat messages from Discord. Commands are only accepted from users with a specified role, so you can use it with peace of mind! DCB Setup Instructions These steps are for creating a dedicated bot for
DiscordPaperBridge. The bot token is sensitive information; do not share it with others.
-
Create the Application and Bot
-
Open the Discord Developer Portal and select
New Application.
-
Enter an application name (e.g.,
Minecraft Bridge).
-
Go to
Bot → Add Bot and confirm to create the bot user.
-
Click
Reset Token under the Bot section and copy the displayed token to a secure location (you can only view it once). Set this value as the token in Paper's config.yml or as the DISCORD_BOT_TOKEN environment variable.
-
On the same
Bot screen, enable Message Content Intent and save the changes. This is required to synchronize standard messages to Minecraft.
-
Invite the Bot to Your Server Go to
OAuth2 → URL Generator and select the following:
-
Scopes:
bot, applications.commands
-
Bot Permissions:
View Channels, Send Messages, Read Message History Open the generated URL, select the target server, and authorize the bot. Administrator permissions are not required. If creating the URL manually, replace CLIENT_ID with the Application ID found in the application's General Information section.
Plaintext
<button class="mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-badge mat-unthemed mat-badge-overlap mat-badge-above mat-badge-after mat-badge-small mat-badge-hidden ng-star-inserted" aria-label="コードをダウンロードする"></button><button class="mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-badge mat-unthemed mat-badge-overlap mat-badge-above mat-badge-after mat-badge-small mat-badge-hidden ng-star-inserted" aria-label="コードをコピー"></button>
https://discord.com/oauth2/authorize?client_id=CLIENT_ID&scope=bot applications.commands&permissions=68608
-
Obtain IDs In Discord, go to
User Settings → Advanced and enable Developer Mode. Right-click items and select Copy ID to obtain the following: - Server ID → guild-id
-
Text channel ID for Minecraft chat synchronization and command submission →
chat-channel-id
-
Role ID(s) authorized to execute commands →
command-role-ids To ensure the bot can access the target channel, please configure the channel permission overrides to allow View Channel, Send Messages, and Read Message History. The command channel and chat channel can be the same channel.
-
Configuration on Paper Configure the values in
plugins/DiscordPaperBridge/config.yml.
YAML
<button class="mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-badge mat-unthemed mat-badge-overlap mat-badge-above mat-badge-after mat-badge-small mat-badge-hidden ng-star-inserted" aria-label="コードをダウンロードする"></button><button class="mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-badge mat-unthemed mat-badge-overlap mat-badge-above mat-badge-after mat-badge-small mat-badge-hidden ng-star-inserted" aria-label="コードをコピー"></button>
token: 'BOT token'
guild-id: 'Discord server ID'
chat-channel-id: 'Channel ID for sending/receiving'
command-role-ids:
- 'Role ID(s) allowed to use commands'
allowed-commands:
- '*' # Enter specific commands here if you wish to restrict usage
Setting this to
'*' allows all Minecraft commands. On Discord, users who possess the specified role and have access to the command-specific channel can execute commands with console-level privileges. If you prefer not to save the bot token in the file, set the
DISCORD_BOT_TOKEN environment variable in your server's startup environment and leave
token: '' as is. Please restart Paper after configuring these settings. Upon the bot connecting, the
/mc-say and
/mc-command commands will be registered on the target server. 5. Verification If you post
/list in the command-specific channel, only users with the authorized role can execute it. Standard messages are sent to Minecraft in the format
[Discord ID(Discord)] Content. Messages posted by the bot itself are ignored. If you accidentally expose your token, immediately regenerate it via the Developer Portal under
Bot >
Reset Token and update the configuration on the Paper side.
このプラグインはDiscord BOTと連携することでDiscordからコマンド、チャットを送信することができます。 コマンドは指定したロールがある人からじゃないと受け付けないので安心! 設定方法 DCB 設定手順 この手順は
DiscordCommandBridge 専用Botを作るためのものです。Botトークンは秘密情報なので、他者へ公開しないでください。
-
アプリとBotを作成
-
Discord Developer Portal を開き、
New Application を選びます。
-
アプリ名を入力します(例:
Minecraft Bridge)。
-
Bot → Add Bot → 確認でBotユーザーを作成します。
-
Bot の Reset Token を押し、表示されたトークンを一度だけ安全な場所へコピーします。これはPaperの config.yml の token、または環境変数 DISCORD_BOT_TOKEN に設定します。
-
同じ
Bot 画面で Message Content Intent を有効化して保存します。通常メッセージをMinecraftへ同期するために必要です。
-
Botをサーバーへ招待
OAuth2 → URL Generator で次を選択します。
-
Scopes:
bot, applications.commands
-
Bot Permissions:
View Channels, Send Messages, Read Message History 生成されたURLを開き、対象サーバーを選択して認証します。Administrator権限は不要です。 URLを手動で作る場合は、CLIENT_IDをアプリの General Information にある Application IDへ置き換えます。
Plaintext
<button class="mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-badge mat-unthemed mat-badge-overlap mat-badge-above mat-badge-after mat-badge-small mat-badge-hidden ng-star-inserted" aria-label="コードをダウンロードする"></button><button class="mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-badge mat-unthemed mat-badge-overlap mat-badge-above mat-badge-after mat-badge-small mat-badge-hidden ng-star-inserted" aria-label="コードをコピー"></button>
https://discord.com/oauth2/authorize?client_id=CLIENT_ID&scope=bot applications.commands&permissions=68608
-
IDを取得 Discordの
ユーザー設定 → 詳細設定 → 開発者モード を有効化します。右クリックの IDをコピー で次を取得します。
-
サーバーID →
guild-id
-
Minecraftチャット同期とコマンド投稿に使うテキストチャンネルID →
chat-channel-id
-
コマンド実行を許可するロールID →
command-role-ids Botが対象チャンネルを見られるよう、チャンネルの権限上書きで View Channel、Send Messages、Read Message History を許可してください。コマンドチャンネルとチャットチャンネルは同じでも動作します。
-
Paper側に設定
plugins/DiscordPaperBridge/config.yml の値を設定します。
YAML
<button class="mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-badge mat-unthemed mat-badge-overlap mat-badge-above mat-badge-after mat-badge-small mat-badge-hidden ng-star-inserted" aria-label="コードをダウンロードする"></button><button class="mdc-icon-button mat-mdc-icon-button mat-mdc-button-base mat-badge mat-unthemed mat-badge-overlap mat-badge-above mat-badge-after mat-badge-small mat-badge-hidden ng-star-inserted" aria-label="コードをコピー"></button>
token: 'BOTトークン'
guild-id: 'discoサーバーID'
chat-channel-id: '送信・受信に使用するchID'
command-role-ids:
- 'コマンドを使えるロールID'
allowed-commands:
- '*'#使えるコマンドを制限したい場合はこちらに許可コマンドを入力
'*' はすべてのMinecraftコマンドを許可する設定です。Discord側では、指定ロールを持ち、コマンド専用チャンネルへ投稿できる人がコンソール権限で実行できます。 Botトークンをファイルに保存したくない場合は、サーバー起動環境に
DISCORD_BOT_TOKEN を設定し、
token: '' のままにします。設定後はPaperを再起動してください。Bot接続時に
/mc-say と
/mc-command が対象サーバーへ登録されます。 5. 確認 コマンド専用チャンネルで
/list と投稿すると、許可ロールを持つ人だけが実行できます。通常の投稿は
[Discord ID(Discord)] 内容 としてMinecraftへ届きます。Bot自身の投稿は無視されます。 トークンを誤って公開した場合は、Developer Portalの
Bot →
Reset Token で即時に再発行し、Paper側も更新してください。