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
ASKUL Engineer
March 30, 2021
Technology
770
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
620
EditorConfigで導くコードの「美しさ」
askul
0
700
いまさら聞けないAWS
askul
0
6.7k
CTOが語る、テックカンパニーに向けた未来の話。by アスクル
askul
0
240
チームでリーダブルコードを実現するには?
askul
0
3.4k
ラズパイを使ってスマートリモコンを作ってみた
askul
0
910
10分で「エラスティックリーダーシップ」をアウトプット
askul
1
4.1k
1on1をする上で大切なこと
askul
2
930
JBUG東京#20 〜そこが知りたい!Backlog活用術〜
askul
1
3.7k
Other Decks in Technology
See All in Technology
[2026-09-30]ロックンロールは鳴り止まないっ - 信頼性かまってちゃん - 「データ駆動を投げ捨ててまで。」追いかける信頼性改善に向けた取り組みの話
tosite
0
200
AI 時代の Azure エンジニアリング ~ 私たちは何を磨き、何を任せるのか ~
chack411
1
450
カンファレンスに参加した後の浮遊感とセルフケア
pauli
0
310
AIは爆速なのに、私が詰まっていた話 ― 音声入力と鳴くマスコットでボトルネックを削る
yama3133
0
520
使いこなすために知っておきたい Azure SRE Agent アンチパターン
torumakabe
2
340
20260930_Gemma4_Hands-on
tsho
0
220
Incremental HTTP
kazuho
5
2k
1万名の社員が使う認証基盤で どう信頼性を担保するか?
kairim0
0
210
ai_cording_with_k8s_knowledge.pdf
mochizuki875
1
280
IoTデバイスを繋げるプロトコルMatterをAndroidで使用する方法
harutiro
0
120
組み立てて楽しむ AWS Blocks 入門
kmiya84377
0
210
SREでアラート疲れを 解決しよう!
kairim0
1
200
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Code Reviewing Like a Champion
maltzj
528
40k
Six Lessons from altMBA
skipperchong
29
4.5k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
620
Navigating Team Friction
lara
192
16k
A Modern Web Designer's Workflow
chriscoyier
699
190k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
66k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
380
Navigating Weather and Climate Data
rabernat
0
550
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
390
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
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