# bot使用方法 1. 建立機器人帳號 到這裡 https://discord.com/developers 登陸之後![](https://i.imgur.com/pOfNhKQ.png) 點藍色按鈕建立新的應用程式 ![](https://i.imgur.com/rzvF5Ej.png) description會出現在bot的關於我 就像這樣子 ![](https://i.imgur.com/po4D9eK.png) 為這個應用程式建立新的機器人 ![](https://i.imgur.com/GqUPVEI.png) 這邊是機器人帳號的基本設定 ![](https://i.imgur.com/RwvM3DS.png) 接下來到這裡勾選bot ![](https://i.imgur.com/gbjcKqe.png) 並且複製最下面的連結 ![](https://i.imgur.com/FMf9pA5.png) 程式的部分 ![](https://i.imgur.com/eqSa0P0.png) 用記事本打開setting.json ```json { "channelsToPost": { "UCXW4MqCQn-jCaxlX-nn-BYg": { "name": "長尾景 / Nagao Kei", "dcEmbedColor": "#8F88E8", "members": { "default": { "postChannel": "935487904657076225", "threadChannel": "935487904657076225", "roleId": null, "notificationMsg": null }, "16GB": { "postChannel": "935487904657076225", "threadChannel": "935487904657076225", "roleId": "test", "notificationMsg": "<@&ID> 吃飯囉大家~" }, "32GB": { "postChannel": "935487904657076225", "threadChannel": "935487904657076225", "roleId": "test", "notificationMsg": "<@&ID> 吃飯囉大家~" } }, "頻道ID": { "name": "名子", "dcEmbedColor": "色碼", "members": { "default": { "postChannel": "935487904657076225", "threadChannel": "935487904657076225", "roleId": null, "notificationMsg": null }, "會員的名": { "postChannel": "935487904657076225", "threadChannel": "935487904657076225", "roleId": "test", "notificationMsg": "<@&ID> 吃飯囉大家~" }, "32GB": { "postChannel": "935487904657076225", "threadChannel": "935487904657076225", "roleId": "test", "notificationMsg": "<@&ID> 吃飯囉大家~" } } } }, "admins": [""], "prefix": "&", "checkInterval": 60, "checkLog": false, "discord": { "guildId": "伺服器ID", "allowedMentions": { "repliedUser": false }, "embedColor": { "normal": "#8F88E8", "error": "#ff0000" } }, "envList": [ "TOKEN" ], "database": { "LIVES": { "name": "lives", "maxLength": 250 }, "THREADS": { "name": "threads" }, "STATUS": { "name": "status" } } } ``` # 複製ID的方式 ![](https://i.imgur.com/6muCGhs.png) ![](https://i.imgur.com/23XPu38.png) ![](https://i.imgur.com/X8uMEyQ.png) # 執行方式 ![](https://i.imgur.com/zF0sQkF.png) 1. 寫bat指令檔案 1. 新增文字檔案到程式資料夾 2. 輸入" node . " 3. 另存成.bat檔案 4. 點兩下直接執行 2. 直接在cmd輸入 ``` cd "專案資料夾路徑" node . ``` ![](https://i.imgur.com/qqsLpEM.png) 如果要跨槽,要加上 /d 之後看到這個代表bot啟動了 ![](https://i.imgur.com/jaC2zKW.png) 指令使用方式 &ping 查看bot的延遲 &頭像 | setavatar | seta 更改頭像 &狀態 | setstatus | sets 更改bot的狀態 ![](https://i.imgur.com/62VUqoc.png) ![](https://i.imgur.com/THeZruv.png) ![](https://i.imgur.com/9nZg49c.png) ![](https://i.imgur.com/6X5obYz.png) 增加指令的名稱 ![](https://i.imgur.com/RrLkvcp.png)