iT邦幫忙

2025 iThome 鐵人賽

DAY 14
0

昨天如果完成,代表API可以正常使用了,但今天我要先做dc機器人,因為discord是我最常使用的社交軟體,比起看email,我更常查看discord

首先先讓我們去建立一個DiscordBot,到Discord Developer Portal,選擇Applications
https://discord.com/developers/docs/intro
https://ithelp.ithome.com.tw/upload/images/20250928/20177920wUooEeFAtB.png選擇右上方的New Application,建好之後點擊左側的Oauth2
https://ithelp.ithome.com.tw/upload/images/20250928/2017792048ISKSk2e3.pnghttps://ithelp.ithome.com.tw/upload/images/20250928/20177920Z6qvMmMUhA.png
拉到最下方,找到Oauth2 URL Generator,勾選bot
https://ithelp.ithome.com.tw/upload/images/20250928/20177920X81V8r7kPG.png
勾選後會再出現一個Bot Permissions,在裡面勾選View Channel跟send Message
https://ithelp.ithome.com.tw/upload/images/20250928/20177920HeBaDJTja9.png
再來拉到最下面,複製URL,開瀏覽器打進去,選擇你要存取的伺服器
https://ithelp.ithome.com.tw/upload/images/20250928/20177920K4LmblBG0x.pnghttps://ithelp.ithome.com.tw/upload/images/20250928/20177920ZmtnnLEiRs.png
加入完後,再次回到我們的Discord Developer Portal,左側選單選擇BOT,右側滑到RESET TOKEN
https://ithelp.ithome.com.tw/upload/images/20250928/201779208RmOitbt9q.png
重置完成後,原本的位置會多出一組代碼,記住他,不然之後就不能查看了,好了之後開啟n8n,右上角+號查詢discord,選擇send message
https://ithelp.ithome.com.tw/upload/images/20250928/20177920gRsg96Fqcp.png
確定你的connection Type是Bot Token,一樣建立新的,把Bot Token輸入進去,其他的根據自己的需求更改,由於跟MEAIL的方式一樣,這邊不多介紹
https://ithelp.ithome.com.tw/upload/images/20250928/20177920eB1izJFctY.png
在上次的GEMINI節點後面的圈圈拖曳新的一條到這個上面,或是直接取代掉,看你
https://ithelp.ithome.com.tw/upload/images/20250928/20177920FSL20dMpRm.png
測試成功
https://ithelp.ithome.com.tw/upload/images/20250928/20177920shhQGbJLq4.png


上一篇
d13 在n8n中使用Gmail寄信
系列文
這是一個一個一個 Python API 與 Gemini 整合、n8n入門指南14
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言