---
disqus: ahb0222
GA : G-VF9ZT413CG
---
> [color=#40f1ef][name=LHB阿好伯, 2024/11/12][:earth_africa:](https://www.facebook.com/LHB0222/)
[TOC]


# Discord
## 創建伺服器

## 創建應用
https://discord.com/developers/applications?new_application=true

## 取得安裝連結
設定權限

取得安裝連結

將安裝連結用瀏覽器打開後新增至剛剛創建的伺服器中


### 開啟伺服器設定取得伺服器ID

## 使用nose-red測試
安裝node-red-contrib-discord-advanced節點

新增discordMessageManager節點

設定伺服器ID

取得令牌並添加到node-red中


測試

```json=
[{"id":"00729d2c9e228802","type":"inject","z":"4d5bcbd127f2b8cf","name":"測試","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"測試","payloadType":"str","x":730,"y":680,"wires":[["1fe141722b0ada85"]]},{"id":"294d0de4de3a8322","type":"debug","z":"4d5bcbd127f2b8cf","name":"debug 90","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1100,"y":660,"wires":[]},{"id":"1fe141722b0ada85","type":"discordMessageManager","z":"4d5bcbd127f2b8cf","name":"阿好伯","channel":"","token":"","x":930,"y":660,"wires":[["294d0de4de3a8322"]]}]
```

# Telegram
# 創建機器人
>[!Tip]搜尋
>`@BotFather`

>[!Note] 輸入
>/newbot

# node-red-contrib-telegrambot
安裝` https://flows.nodered.org/node/node-red-contrib-telegrambot`
輸入剛剛得到的Bot名稱跟金鑰


## 創建群組

加入Bot

取得群組ID

## 發送訊息

將ChatID寫到函數中
```javascript=
msg.payload = {
chatId: <ChatID>,
messageId: 11,
type: "message",
content: msg.payload,
date: Date.now()
};
return msg;
```
訊息測試

# 參考資料
https://medium.com/zrealm-robotic-process-automation/10-%E5%88%86%E9%90%98%E5%BF%AB%E9%80%9F%E7%A7%BB%E8%BD%89-line-notify-%E5%88%B0-telegram-bot-%E9%80%9A%E7%9F%A5-6922e90ba90c
🌟
🌟全文可以至下方連結觀看或是補充
全文分享至
https://www.facebook.com/LHB0222/
https://www.instagram.com/ahb0222/
有疑問想討論的都歡迎於下方留言
喜歡的幫我分享給所有的朋友 \o/
有所錯誤歡迎指教
# [:page_with_curl: 全部文章列表](https://hackmd.io/@LHB-0222/AllWritings)
