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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ASKUL Engineer
March 30, 2021
Technology
0
690
Discord Bot はじめの一歩
20210325 AStudy+
https://askul.connpass.com/event/204742/
speaker:みわすけ
ASKUL Engineer
March 30, 2021
Tweet
Share
More Decks by ASKUL Engineer
See All by ASKUL Engineer
EditorConfigで導くコードの「美しさ」
askul
0
630
いまさら聞けないAWS
askul
0
6.3k
CTOが語る、テックカンパニーに向けた未来の話。by アスクル
askul
0
190
チームでリーダブルコードを実現するには?
askul
0
3.2k
ラズパイを使ってスマートリモコンを作ってみた
askul
0
830
10分で「エラスティックリーダーシップ」をアウトプット
askul
0
3.7k
1on1をする上で大切なこと
askul
1
850
JBUG東京#20 〜そこが知りたい!Backlog活用術〜
askul
1
3.4k
GCPを活用した物流倉庫内の異常検知/Anomaly detection in distribution warehouse using GCP
askul
0
3.5k
Other Decks in Technology
See All in Technology
Frontier Agents (Kiro autonomous agent / AWS Security Agent / AWS DevOps Agent) の紹介
msysh
3
120
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
1
850
しろおびセキュリティへ ようこそ
log0417
0
250
Vitest Highlights in Angular
rainerhahnekamp
0
130
Amazon Bedrock AgentCore 認証・認可入門
hironobuiga
2
480
みんなだいすきALB、NLBの 仕組みから最新機能まで総おさらい / Mastering ALB & NLB: Internal Mechanics and Latest Innovations
kaminashi
0
200
セキュリティについて学ぶ会 / 2026 01 25 Takamatsu WordPress Meetup
rocketmartue
1
260
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
M&A 後の統合をどう進めるか ─ ナレッジワーク × Poetics が実践した組織とシステムの融合
kworkdev
PRO
1
280
月間数億レコードのアクセスログ基盤を無停止・低コストでAWS移行せよ!アプリケーションエンジニアのSREチャレンジ💪
miyamu
0
670
toCプロダクトにおけるAI機能開発のしくじりと学び / ai-product-failures-and-learnings
rince
6
5.2k
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
1.5k
Featured
See All Featured
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
720
The untapped power of vector embeddings
frankvandijk
1
1.6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
170
Mobile First: as difficult as doing things right
swwweet
225
10k
Site-Speed That Sticks
csswizardry
13
1.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
Raft: Consensus for Rubyists
vanstee
141
7.3k
BBQ
matthewcrist
89
10k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Tell your own story through comics
letsgokoyo
1
800
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
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