Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Discord Bot はじめの一歩
Search
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
500
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
920
JBUG東京#20 〜そこが知りたい!Backlog活用術〜
askul
1
3.6k
Other Decks in Technology
See All in Technology
Where Is JetBrains AI Heading- — Central CLI, Air Alpha, and the Agentic Development Stack
x5gtrn
PRO
0
110
JAWS-UG初心者支部#88わいわい初心塾(夏休みの宿題やったかGit編)
otsuki
0
120
Level Up Your CDK DX: 5 Tools I’ve Been Building
gotok365
2
190
AI時代におけるプロダクト横断勉強会の設計
zozotech
PRO
0
150
bet_ai_day_2026_session02
agenticsec
1
910
データエンジニアリングワークショップ:Auto LoaderとSparkで学ぶデータパイプライン構築
databricksjapan
PRO
0
140
KPIだけでは評価できないプロダクトが考えるべき Evalsという第二の評価系 / Beyond KPIs: Evals as a Second Evaluation Framework for Products #PdEConf
aki_iinuma
3
3.5k
プロダクト思考 × 基盤思考を AIで実現する Compound Engineering
tkc66buzz
1
240
[RSJ26] Building a VLA Model Based on Self-Distilled Classification
keio_smilab
PRO
0
190
AIで実装は速くなった。なのにプロダクトは速くならない。職能の壁を越えて価値のフローを設計する
nwiizo
6
6.7k
生成AI時代の クレデンシャルとパーミッション設計
nrinetcom
PRO
3
1.5k
少人数データチームのDevin活用実践事例
runandy16
2
430
Featured
See All Featured
Paper Plane
katiecoart
PRO
2
53k
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
Tell your own story through comics
letsgokoyo
1
1.1k
Color Theory Basics | Prateek | Gurzu
gurzu
0
450
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
The Limits of Empathy - UXLibs8
cassininazir
1
630
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
440
Typedesign – Prime Four
hannesfritz
42
3.2k
Designing for Performance
lara
611
70k
We Are The Robots
honzajavorek
0
330
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
300
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