วิธีทำบอท Discord บอทเปิดเพลง, แอดมินเซิฟเวอร์
Module บอท Nadeko
เริ่มต้น ไปที่ https://cloud.google.com/
กดเริ่มทดลองใช้ฟรี ( ขณะที่อ่านอยู่นี้ ถ้ามันปิดทดลองใช้ฟรี 1 ปี ไปแล้ว ก็ถือว่าโชคร้าย )
เลือกคำว่า คอลโซล
หาคำว่า Computer Engine

สร้างอินสแตนซ์
เลือกสเปค VM ตามต้องการ
ในรูปเลือกแบบต่ำนิดหน่อย จะได้ไม่เสียเครดิสรายเดือนเยอะ
เลือกโซนเป็น Asia-southeast เพราะจะไม่แลคเมื่อใช้งานในประเทศไทย กดสร้าง

หลังจากสร้างเสร็จแล้ว ดูตรงคำว่า SSH เลือก เปิดในหน้าต่างเบราว์เซอร์

วิธีลง Nadeko bot แบบ อังฤษ
http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/
จะมีหน้าต่างแบบนี้ออกมา

หลังจากนั้น ก็อปคำว่า
cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.4/linuxAIO.sh && bash linuxAIO.sh
กด ctrl+v เพื่อวาง

กด Enter
รอสักพัก ตรงบรรทัดสุดท้ายจะเป็นแบบนี้

เมื่อลงบอทเป็นครั้งแรก เลือกข้อ 4. Auto-Install Prerequisites (for Ubuntu, Debian and CentOS)
กด enter แล้ว กด Y เพื่อตกลงไปเรื่อย ๆ รอมันลงเสร็จ
ต่อไปเริ่มลง NadekoBot เลือก 1. Download NadekoBot กด enter
เลือกข้อ 5. Set up credentials.json (if you have downloaded the bot already)
กด y enter
please enter your bot client id
วิธีหา ไปที่ https://discordapp.com/developers/applications/me
เลือก new app
ตั้งชื่อบอทของเรา ภาษาไทยหรืออังกฤษก็ได้ ( ถ้าตั้งแล้วจะเปลี่ยนไม่ได้อีก )
อัพรูปของบอท ( จะอัพทีหลังก็ได้ ) กด create app

คลิกที่ บอทที่เพิ่งสร้าง เลือก Create a Bot User

ติ๊กถูกตรง Public Bot

ก็อบเลขตรงคำว่า Client ID ไปใส่ กด enter
ต่อไปมันจะถามว่า Please enter your bot ID (should be same as your client ID):
ใส่เลขเดียว กับตรง Client ID
ต่อไปมันจะถามว่า
Please enter your bot token (It is not bot secret, it should be ~59 characters long.):
คลิกที่ click to reveal

กด ctrl+v แล้ว enter
ต่อไป Please enter your own ID (Refer to the guide, it will be bot's owner ID.):
คลิกขวาที่ไอดีดิสขอดของเรา เลือก copy id

กด ctrl+v แล้ว enter
Please enter Google API key (Refer to the guide.):
วิธีหา google API key คลิก
1.ไปที่ https://console.developers.google.com/
ด้านบนเลือกคำว่า สร้างโครงการ ตั้งชื่ออะไรไปก็ได้

เลือก เปิดใช้ API
2. คลิกคำว่า ไลบรารี
API ยอดนิยมอื่นๆ
คลิกเปิดใช้ URL Shortener API และ Custom Search API

API ของ YouTube
คลิกเปิดใช้ YouTube APIs และ YouTube Data API
API ของ Google Maps
เปิดใช้
Google Maps APIs section
Google Maps Geocoding API
Google Maps Time Zone API
ไปที่ข้อมูลรับรอง > สร้างข้อมูลรับรอง > คีย์ API


ctrl+v ใส่ในบอท
API อันอื่นนั้น กด Enter รัว ๆ ได้เลย เพราะไม่จำเป็น
ปิดหน้าต่าง
ต่อไปเป็นวิธีเปิดบอท ตลอดเวลา แม้เราจะปิดเครื่องคอมไปนอนเลย
ตรง SSH เลือก > เปิดในหน้าต่างเบราว์เซอร์
พิมพ์ หรือ ก็อป คำว่า tmux new -s nadeko กด Enter
ก็อปคำสั่ง
cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.4/linuxAIO.sh && bash linuxAIO.sh
กด enter
เลือก 2. Run Nadeko (Normally)
คำสั่งบอท นาเดโกะ
http://nadekobot.readthedocs.io/en/latest/Commands%20List/
ไม่มีความคิดเห็น:
แสดงความคิดเห็น