--- tags: Minecraft,Plugins title: DiscordSRV基本教學(版本已經過時) author: Youzi#0753(856918496893599805) --- # 插件:基本DiscordSRV教學(版本已經過時) ###### tags: `Minecraft` `Plugins` > 由 Youzi#0753 撰寫 支援伺服器:[<img src="https://discordapp.com/api/guilds/540630552609554453/widget.png?style=shield" alt="">](https://discord.gg/Vq3F8DUNzf) :::warning 如果不知道什麼是插件,請上網Google搜尋! ::: ## 1.基本機器人架設 ### [架設機器人(點擊前往機器人架設頁面)](https://discord.com/developers/applications) ### I. 點選右上角的 [New Application]![](https://i.imgur.com/si4AUfV.png) ### II. 輸入名字並創建(隨便取名,不影響,純辨識用)!![](https://i.imgur.com/kYCjDXL.png) ### III. 點選左邊的 Bot 選項,並點擊 Add Bot 並確定創建!![](https://i.imgur.com/5FlP6yM.png) :::warning 無法刪除機器人喔! ::: ### IV. 為機器人取名字+圖片吧!(記得要儲存)![](https://i.imgur.com/X91A5Jg.png) ### V. 邀請機器人加入! 前往 OAuth2 的頁面, 於 SCOPES 的表格中找到 bot 的選項並打勾,並且複製下方的連結,即可將機器人邀請至伺服器中! ![](https://i.imgur.com/cgOanuP.png) ### V-2. 權限計算機 當 bot 的選項被啟用時,下方會多出一個權限計算機,那裡可以讓機器人擁有自己的專屬身分組 Discordsrv建議開啟以下這些選項: ![](https://i.imgur.com/v0LOhgx.png) 或是開啟(比較建議使用這個) ![](https://i.imgur.com/OakUKio.png) ### VI. 完成! :::info 機器人是離線的是正常的喔! ::: ## 2.DiscordSRV 設定檔案 *如果已經下載了並且上傳可以跳到步驟 III. ! ### I. 下載DiscordSRV的設定檔案 https://www.spigotmc.org/resources/discordsrv.18494/ 點選右邊的 立刻下載 ![](https://i.imgur.com/W6DPIUx.png) ### II. 放到你的伺服器裡面! 放到 /home/container/plugins ![](https://i.imgur.com/tJu0R9e.png) ### III. 開啟你的伺服器並且關閉 讓你的檔案出現! ![](https://i.imgur.com/t6tPBwg.png) ### IV. 打開 DiscordSRV的config.yml 檔案 在 /home/container/plugins/DiscordSRV/config ![](https://i.imgur.com/3p9x2oL.png) ### V. 放置你的Bot Token ![](https://i.imgur.com/9Wt32YE.png) 把它複製並貼於 config.yml 的 第8行 (使用ctrl+F找可以更快找到!) ```yml # Bot token; don't know what this is? Look at the video on the plugin page for instructions BotToken: "你的機器人TOKEN" ``` ![](https://i.imgur.com/MHnohdo.png) :::warning 如果沒有放置將會無法啟用 ::: :::danger 千萬不要公開你的機器人TOKEN,否則會被有心人士拿來炸掉你的伺服器! ::: ### VI. 選擇訊息發送頻道&編輯Discord邀請 config.yml 的 第26~33行 (使用ctrl+F找可以更快找到!) 頻道點選右鍵 ![](https://i.imgur.com/CSpO0Vo.png) 點選最底下的複製頻道ID,並貼到下方的config.yml中 ![](https://i.imgur.com/P5hBUIV.png) ```yml # The first part of channel pairs is not the Discord channel name! Channels: {"global": "你的串流頻道ID"} # Console channel numerical ID (NOT NAME), leave blank to disable the console channel all together DiscordConsoleChannelId: "你Minecraft控制台發送的頻道ID" # Invitation link shown to players when using /discord and on the message shown to unlinked players when linking is enforced` DiscordInviteLink: "discord.gg/邀請代碼" ``` ![](https://i.imgur.com/QuJeVqD.png) ### VII. 啟動你的伺服器,完成了! ### VII-2. 番外篇:webhook呈現玩家訊息的方式 效果長這樣: ![](https://i.imgur.com/ZY1UQBu.png) 將 config.yml 檔案的 第50行 (使用ctrl+F找可以更快找到!) ```yml Experiment_WebhookChatMessageDelivery: false ``` 改成 true : ```yml Experiment_WebhookChatMessageDelivery: true ``` ![](https://i.imgur.com/WMuZqIk.png) 即可啟用!