Skip to content

เพิ่ม Discord Channel

สิ่งที่ต้องเตรียมก่อนเริ่ม

RequirementPurpose
Discord accountใช้สร้าง server, channel และ developer application
Discord serverBot ต้องอยู่ใน server ก่อนจึงจะ access channel ได้
Text channelImages และ files จะถูกส่งไปยัง channel นี้
Discord Developer Portalใช้สร้าง application, สร้าง bot และรับ Bot Token

เพิ่มได้จากที่ไหน

  1. เปิด System Settings
  2. ไปที่ Upload Settings
  3. คลิก Add Channel ที่มุมขวาบน
  4. เลือก Discord

Field Reference

Fieldใช้ทำอะไรRequired
Channel nameชื่อที่จำง่ายสำหรับ channel นี้ เช่น "Discord Primary"Required
Bot TokenDiscord bot tokenRequired
Channel IDID ของ target text channelRequired
Proxy URL (optional)ใช้เฉพาะเมื่อ Discord CDN access ไม่เสถียร ใส่ full URL รวม https://Optional

ขั้นตอนตั้งค่า

1. สร้าง Discord Server และ Text Channel

  1. เปิด Discord
  2. สร้าง server ใหม่ หรือใช้ existing server ที่คุณเป็นเจ้าของ
  3. สร้าง text channel ใน server นั้น

Create a server

2. สร้าง Bot ใน Discord Developer Portal

  1. เปิด Discord Developer Portal: https://discord.com/developers/applications
  2. คลิก New Application
  3. ใส่ application name แล้วสร้าง
  4. เปิดหน้า Bot จาก left sidebar
  5. Generate หรือ reset token ในหน้า Bot
  6. Save token ไว้

Token นี้คือ Bot Token ที่ต้องใส่ใน ImgBed

View the bot token

  1. เปิดหน้า OAuth2 จาก left sidebar
  2. ใน scopes ให้เลือก bot
  3. ใน permission area ให้ enable permissions เหล่านี้:
PermissionRequired
View ChannelsYes
Send MessagesYes
Attach FilesYes
Read Message HistoryYes
  1. ด้านล่างของ page ให้ confirm ว่า integration type เป็น Guild Install
  2. Copy generated URL
  3. เปิด URL นั้นใน browser
  4. เลือก target server
  5. ทำ authorization flow ให้เสร็จ

Select bot permissions in OAuth2

Invite the bot to the channel

4. Enable Developer Mode และ Copy Channel ID

  1. คลิก gear icon ข้าง avatar มุมซ้ายล่างของ Discord
  2. เปิด Advanced จาก left sidebar
  3. Enable Developer Mode
  4. กลับไปที่ target text channel
  5. Right-click ชื่อ channel
  6. คลิก Copy Channel ID

เลขที่ copy ได้คือ Channel ID ที่ ImgBed ต้องใช้

Enable developer mode

Copy the channel ID

5. ใส่ Discord Channel ใน ImgBed

กลับไปที่ channel configuration dialog แล้วกรอกดังนี้:

UI FieldValue
Channel nameCustom channel name เช่น DiscordPrimary
Bot TokenToken ที่ save จากหน้า Bot ใน Discord Developer Portal
Channel IDChannel ID ที่ copy จาก Discord
Proxy URL (optional)ใส่เฉพาะเมื่อจำเป็น เช่น https://your-proxy.example.com

กรอกครบแล้วคลิก Save

Add the Discord channel configuration

วิธีตรวจสอบ

Checkวิธีตรวจสอบ
เห็น channel cardหลัง save หน้า Upload Settings ควรแสดง Discord channel card
Channel เปิดใช้งานได้Active switch ควรอยู่ on
Configuration ถูกบันทึกDetail view ควรแสดงว่า Bot Token และ Channel ID ถูกบันทึกแล้ว
Upload ใช้งานได้Upload test image แล้วตรวจว่าไปปรากฏใน target Discord text channel

Quick Checklist

text
สร้าง Discord server
-> สร้าง text channel
-> สร้าง bot ใน Discord Developer Portal
-> Save Bot Token จากหน้า Bot
-> ใน OAuth2 เลือก bot, View Channels, Send Messages, Attach Files และ Read Message History
-> Copy generated URL แล้ว authorize bot ให้ target server
-> ตรวจว่า target text channel ให้ permissions เดียวกัน
-> Enable Developer Mode
-> Right-click target text channel แล้ว copy Channel ID
-> ใส่ Bot Token และ Channel ID ใน ImgBed
-> Save แล้ว upload test image

References

  1. Discord Developers Getting Started: https://docs.discord.com/developers/quick-start/getting-started
  2. Discord Help - Where can I find my User/Server/Message ID: https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID

Released as user documentation for CloudFlare ImgBed.