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
750
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
390
EditorConfigで導くコードの「美しさ」
askul
0
680
いまさら聞けないAWS
askul
0
6.6k
CTOが語る、テックカンパニーに向けた未来の話。by アスクル
askul
0
220
チームでリーダブルコードを実現するには?
askul
0
3.4k
ラズパイを使ってスマートリモコンを作ってみた
askul
0
880
10分で「エラスティックリーダーシップ」をアウトプット
askul
1
4k
1on1をする上で大切なこと
askul
1
910
JBUG東京#20 〜そこが知りたい!Backlog活用術〜
askul
1
3.6k
Other Decks in Technology
See All in Technology
NetBoxを利用した作業効率化の試み_NetDevNight4
tnoha
0
460
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
230
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
SmartHR Engineering Team Deck
smarthr
0
190
AI ネイティブな組織に Gemini Enterprise Agent Platform がなぜ必要なのか
asei
1
170
【CEDEC2026】次世代デジタルカードゲームのサーバー設計と運用 〜『Shadowverse: Worlds Beyond』の舞台裏~
cygames
PRO
0
820
最高のシステムプロンプトを作るためにフィードバック機能を導入した話
alchemy1115
1
330
事業価値と Engineering 2026年度版
recruitengineers
PRO
28
15k
【CEDEC2026】『GRANBLUE FANTASY: Relink - Endless Ragnarok』のバトル制作事例 ~最高のキャラゲーを目指して~
cygames
PRO
0
190
『三匹の子ぶた』から学ぶネットワークセキュリティの昔と今 / Network Security: Then and Now Through the Lens of The Three Little Pigs
nttcom
1
1.7k
AIエージェントを前提としたプラットフォーム エンジニアリング:GKEで作るAgent-Ready Golden Path
legalontechnologies
PRO
1
150
ラジオの科学
frievea
0
200
Featured
See All Featured
KATA
mclloyd
PRO
35
15k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
760
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
420
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
400
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
240
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
240
Making the Leap to Tech Lead
cromwellryan
135
10k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
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