Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Discord Bot はじめの一歩
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
ASKUL Engineer
March 30, 2021
Technology
760
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Discord Bot はじめの一歩
20210325 AStudy+
https://askul.connpass.com/event/204742/
speaker:みわすけ
ASKUL Engineer
March 30, 2021
More Decks by ASKUL Engineer
See All by ASKUL Engineer
組織における AI-DLC 実践
askul
0
510
EditorConfigで導くコードの「美しさ」
askul
0
700
いまさら聞けないAWS
askul
0
6.6k
CTOが語る、テックカンパニーに向けた未来の話。by アスクル
askul
0
230
チームでリーダブルコードを実現するには?
askul
0
3.4k
ラズパイを使ってスマートリモコンを作ってみた
askul
0
900
10分で「エラスティックリーダーシップ」をアウトプット
askul
1
4k
1on1をする上で大切なこと
askul
2
930
JBUG東京#20 〜そこが知りたい!Backlog活用術〜
askul
1
3.6k
Other Decks in Technology
See All in Technology
2026-09-09 【sigma_ucj#1】Sigma を IaC 管理したい! / IaC for Sigma
civitaspo
0
110
2026-09-11 【Snowflake World Tour Tokyo 2026】Snowflakeを起点に、AI Agentが自律稼働し続ける未来へ / Driving AI Agents with Snowflake
civitaspo
0
270
The Agent Builder Loop from Daily Work to OSS
minorun365
PRO
3
120
全員がプロダクトへ向き合う組織を持続成長させるために——組織づくりのフライホイールと4象限 / The Flywheel Model and Four Quadrants for Organizational Design
hiro_torii
4
940
AIとペアプロを始める。人とのペアプロをやめる。ペアプロの良さを改めて知る。もっと好きになった。 / Rediscovering Pair Programming
honyanya
1
330
enechainの内製セルフサービスプラットフォーム
hiyosi
0
150
WAF 運用改善の承認サイクル/SRE_BizReach_MIXI_1
visional_engineering_and_design
2
410
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
3
440
「図書館」という名前のままでいいのか -Code4Lib JAPANカンファレンス2026 アンカンファレンス報告- / Code4Lib JAPAN Conference 2026: Unconference Report
ykiyota
0
150
Webとヘルスデータ
yukukotani
1
230
When Does a Local Qwen Start to Break
morshoto
0
190
20260912_スクフェス三河
kgnkhkr
0
230
Featured
See All Featured
KATA
mclloyd
PRO
35
15k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
490
A designer walks into a library…
pauljervisheath
211
25k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
320
Statistics for Hackers
jakevdp
799
230k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
540
It's Worth the Effort
3n
188
29k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
530
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
Transcript
DiscordBot はじめの⼀歩 アスクル株式会社 三輪亮介
⾃⼰紹介 • ⾃分について⾊々わかっていないためサイズ違いの靴や服が 余っている • 社会⼈になって太った • 業務では、AWSの構築などインフラ関連のことを⾏なっている 1
⽬次 1. Discordの紹介 2. やってみる 3. Botの例 2
Discordって︖ • ビデオ、⾳声通話ソフト • 1つのサーバーに複数の通話部屋、チャット部屋を作ることが できる 3
4
DiscordのBotって︖ • ユーザーの⼊⼒に⾃動応答させられる • ユーザーができることはだいたいできる • 複数⾔語対応 (https://discordpy.readthedocs.io/ja/latest/api.html) 5
6 やってみる
サンプル import discord import os import setToken # 環境変数を使うべき。今回は外部ファイルを参照 #
token = os.environ['DISCORD_TOKEN’] TOKEN = setToken.tokenclient = discord.Client()# 起動時 @client.event async def on_ready(): print("AStudy discordBot")# チャットイベント @client.event async def on_message(message): # メッセージ送信者がBotだった場合は無視する if message.author.bot: return # /test に対してhelloを返答 if message.content == '/test': await message.channel.send('hello')# bot起動 client.run(TOKEN) 7