$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
はじめてのDiscordBot
Search
株式会社ビットキー / Bitkey Inc.
PRO
June 29, 2022
Technology
0
480
はじめてのDiscordBot
株式会社ビットキー / Bitkey Inc.
PRO
June 29, 2022
Tweet
Share
More Decks by 株式会社ビットキー / Bitkey Inc.
See All by 株式会社ビットキー / Bitkey Inc.
【開発を止めるな】機能追加と並行して進めるアーキテクチャ改善/Keep Shipping: Architecture Improvements Without Pausing Dev
bitkey
PRO
1
130
“決まらない”NSM設計への処方箋 〜ビットキーにおける現実的な指標デザイン事例〜 / A Prescription for "Stuck" NSM Design: Bitkey’s Practical Case Study
bitkey
PRO
1
720
AI時代の戦略的アーキテクチャ 〜Adaptable AI をアーキテクチャで実現する〜 / Enabling Adaptable AI Through Strategic Architecture
bitkey
PRO
16
16k
Dev Containers と Skaffold で実現する クラウドネイティブ開発環境 ローカルのみという制約に挑む / Cloud-Native Development with Dev Containers and Skaffold: Tackling the Local-Only Constraint
bitkey
PRO
0
270
待つ、歩く、そして祈る -モバイルアプリの厄介なテスト奮闘記-/Wait, Walk, and Pray -The Troublesome Struggle of Mobile App Testing-
bitkey
PRO
1
120
見栄えと使いやすさの先にある 特別感 をデザインする / Designing a Sense of Specialness Beyond Aesthetics and Usability
bitkey
PRO
0
220
フレームワーク探しはもう終わり! チームに「ジャストフィット」するワークショップの作り方 / No More Framework Searching: How to Build a 'Just-Fit' Workshop for Your Team
bitkey
PRO
0
130
一次体験を起点にしたUX改善の取り組み / Direct Experience Driven UX Improvements
bitkey
PRO
0
320
ユーザー体験は細部に宿る -ウィジェットQAの挑戦と気づき- / UX is in the details: Challenges and Learnings from Widget QA
bitkey
PRO
0
130
Other Decks in Technology
See All in Technology
株式会社ビザスク_AI__Engineering_Summit_Tokyo_2025_登壇資料.pdf
eikohashiba
1
110
半年で、AIゼロ知識から AI中心開発組織の変革担当に至るまで
rfdnxbro
0
140
MySQLのSpatial(GIS)機能をもっと充実させたい ~ MyNA望年会2025LT
sakaik
0
100
SREが取り組むデプロイ高速化 ─ Docker Buildを最適化した話
capytan
0
140
モダンデータスタックの理想と現実の間で~1.3億人Vポイントデータ基盤の現在地とこれから~
taromatsui_cccmkhd
2
260
ハッカソンから社内プロダクトへ AIエージェント ko☆shi 開発で学んだ4つの重要要素
leveragestech
0
130
AI駆動開発の実践とその未来
eltociear
2
490
Strands Agents × インタリーブ思考 で変わるAIエージェント設計 / Strands Agents x Interleaved Thinking AI Agents
takanorig
5
2.1k
特別捜査官等研修会
nomizone
0
560
たまに起きる外部サービスの障害に備えたり備えなかったりする話
egmc
0
410
子育てで想像してなかった「見えないダメージ」 / Unforeseen "hidden burdens" of raising children.
pauli
2
320
2025-12-18_AI駆動開発推進プロジェクト運営について / AIDD-Promotion project management
yayoi_dd
0
160
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
95
14k
エンジニアに許された特別な時間の終わり
watany
106
220k
Reality Check: Gamification 10 Years Later
codingconduct
0
1.9k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
1
210
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Test your architecture with Archunit
thirion
1
2.1k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
38
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
680
Navigating Weather and Climate Data
rabernat
0
53
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
250
Transcript
͡ΊͯͷDiscord Bot
Outline 1. ࣗݾհ 2. ͳͥDiscord Bot͕ඞཁͳͷ͔ 3. Discord Bot Λಈ͔ͯ͠ΈΔ
4. Discord Bot ΛVCʹࢀՃͤ͞Δ 5. ·ͱΊ 2 2
1. ࣗݾհ • ໊લ ◦ ͼ͖͋ (BYAK) • ձࣾ ◦
גࣜձࣾϏοτΩʔ • ࣄ ◦ Go ͰόοΫΤϯυͷ։ൃ ◦ React+Firebase Ͱϑϩϯτͷ։ൃ ◦ C++ ͰϑΝʔϜΣΞͷςετσόοά • झຯ ◦ ϘʔυήʔϜ ◦ VϥΠόʔͷਪ͠׆ 3
ͳͥDiscord Bot͕ඞཁͳͷ͔ 4 4
2. DiscordͱίϛϡχςΟ ίϛϡχςΟαʔόʔͱͯ͠ͷ Discord • ίϛϡχςΟʹɺίϛϡχςΟಛ༗ͷϧʔϧͱͦΕʹ͏ӡ༻࡞ۀ͕ੜ ·Ε͕ͪ ◦ ྫ: αʔόʔʹࢀՃͨ͠ਓͷΦϯϘʔσΟϯά
▪ ࣗݾհɺϩʔϧͷద༻ ◦ ྫ: ϒϩʔυΩϟετ৴ͷࡍͷςΩετͷಡΈ্͛ 5
2. DiscordͱίϛϡχςΟ ίϛϡχςΟαʔόʔͱͯ͠ͷ Discord • ίϛϡχςΟʹɺίϛϡχςΟಛ༗ͷϧʔϧͱͦΕʹ͏ӡ༻࡞ۀ ͕ੜ·Ε͕ͪ ◦ ྫ: αʔόʔʹࢀՃͨ͠ਓͷΦϯϘʔσΟϯά
▪ ࣗݾհɺϩʔϧͷద༻ ◦ ྫ: ϒϩʔυΩϟετ৴ͷࡍͷςΩετͷಡΈ্͛ 6 ࣗಈԽ͠Α͏ɹˠɹDiscord ͷ BotػೳΛ͑Ͱ͖ͦ͏
2. DiscordͱίϛϡχςΟ ࠓઆ໌͢Δ༰ 1. Discord Bot Λىಈ͠ɺαʔόʔͰϝοηʔδΛΓͱΓ͢Δ 2. Bot ΛϘΠενϟοτʹࢀՃͤ͞ɺԻσʔλΛ࠶ੜ͢Δ
7
Discord Bot Λಈ͔ͯ͠ΈΔ 8 8
3. Discord Bot Λಈ͔ͯ͠ΈΔ ͜ 9
3. Discord Bot Λಈ͔ͯ͠ΈΔ ͜ 10
3. Discord Bot Λಈ͔ͯ͠ΈΔ ͜ 11
3. Discord Bot Λಈ͔ͯ͠ΈΔ ͜ 12
3. Discord Bot Λಈ͔ͯ͠ΈΔ • Πϕϯτͱϋϯυϥ ◦ discord ͍͔ͭ͘Πϕϯτ͕ఆٛ͞Ε͍ͯͯɺదٓൃՐ͢Δͷ ͰɺΠϕϯτʹԠͨ͡ϋϯυϥΛొ͢Δ͜ͱͰɺͦͷΠϕϯτ͕
ൃੜͨ͠λΠϛϯάͰ bot ʹॲཧΛ࣮ߦͤ͞Δ͜ͱ͕Ͱ͖·͢ɻ ▪ ྫ: Ready: Bot͕αʔόʔʹଓ͠·ͨ͠ ▪ ྫ: Message Create: ϝοηʔδ͕ૹΒΕ·ͨ͠ ◦ discordgo Ͱ discord ͷΠϕϯτ໊ʹରԠͨ͠ struct ͕ఆٛ͞Ε ͍ͯͯɺϋϯυϥͷୈ̎Ҿʹ͖ͬͯ·͢ɻ 13
3. Discord Bot Λಈ͔ͯ͠ΈΔ 14
3. Discord Bot Λಈ͔ͯ͠ΈΔ 15
3. Discord Bot Λಈ͔ͯ͠ΈΔ 16
3. Discord Bot Λಈ͔ͯ͠ΈΔ 17
Bot ΛVCʹࢀՃͤ͞Δ 18 18
Α͋͘ΔΠϯλʔϑΣʔε “!!” ࢝·ΓͳͲͰίϚϯυΛஅ͠ɺ ίϚϯυͷૹ৴ऀͷ͍ΔVCʹࢀՃͨ͠Γɺ ίϚϯυʹΑͬͯޮՌԻΛྲྀͨ͠Γ͢Δػೳ͕͋Γ·͢ 4. Bot ΛVCʹࢀՃͤ͞Δ 19
20 4. Bot ΛVCʹࢀՃͤ͞Δ
21 4. Bot ΛVCʹࢀՃͤ͞Δ
22 4. Bot ΛVCʹࢀՃͤ͞Δ
23 4. Bot ΛVCʹࢀՃͤ͞Δ
24 4. Bot ΛVCʹࢀՃͤ͞Δ
25 4. Bot ΛVCʹࢀՃͤ͞Δ
26 4. Bot ΛVCʹࢀՃͤ͞Δ
·ͱΊ 27 27
28 5. ·ͱΊ • ·ͱΊ ◦ discordgo, dgvoice Λ͏͜ͱͰ؆୯ʹBotΛ࣮Ͱ͖Δ ◦
Discord্Ͱਓ͕ߦ͏ૢ࡞BotʹҠৡͰ͖Δ ◦ ͜͜Ͱઆ໌͠ͳ͔ͬͨΠϕϯτૢ࡞ʹ͍ͭͯެࣜυΩϡϝϯτΛࢀ র͠ɺରԠͨ͠ discordgo ͷAPIΛௐΔͱྑ͍ɻ ▪ discordgo Discord API ͷϨϕϧϚοϐϯάΛతͱͨ͠ϥΠϒ ϥϦͷͳͷͰɺެࣜυΩϡϝϯτ͕ͦͷ··ͯ·Δ͜ͱ͕ଟ͍ ▪ discordgo/examples ࢀߟʹͳΔ ▪ Ͳ͏ͯ͠Θ͔Βͳ͚Ε Discord Gophers
29 5. ·ͱΊ ͜ͷࢿྉͷݩʹͳͬͨDiscord Botͪ͜Β https://github.com/byakheee/my-discord-bot