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
720
0
Share
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
EditorConfigで導くコードの「美しさ」
askul
0
670
いまさら聞けないAWS
askul
0
6.5k
CTOが語る、テックカンパニーに向けた未来の話。by アスクル
askul
0
210
チームでリーダブルコードを実現するには?
askul
0
3.3k
ラズパイを使ってスマートリモコンを作ってみた
askul
0
870
10分で「エラスティックリーダーシップ」をアウトプット
askul
1
3.9k
1on1をする上で大切なこと
askul
1
890
JBUG東京#20 〜そこが知りたい!Backlog活用術〜
askul
1
3.5k
GCPを活用した物流倉庫内の異常検知/Anomaly detection in distribution warehouse using GCP
askul
0
3.6k
Other Decks in Technology
See All in Technology
[みん強]AIの価値を最大化するデータ基盤戦略:Self-Service型Data Meshへの転換とAgentic AI Meshに向けた取り組み with Snowflake他
y_matsubara
1
180
Amazon CloudFrontにおけるAIボットアクセス制御のポイント
kizawa2020
4
260
シンデレラなんかになりたくない!ガラスの靴が割れた時代にどう歩く?
nomizone
0
190
TypeScript の型で副作用の実行順序を制御する
yanaemon
2
210
AIのために、AIを使った、Effect-TSからの脱却 〜テストを活用した安全なリファクタリングの進め方〜
bitkey
PRO
1
550
情シスがMCP環境導入時に打ちのめされる認可の崖
oidfj
0
440
はじめてのAI-DLC
yoshidashingo
2
520
AIコーディングエージェントの活用で、コードは静かに肥大化した
yosukeshinoda
1
340
LLM時代のリファクタリング戦略_AIエージェントによる段階的・安全なTS移行方法
play_inc
0
180
AI Agent に“攻略本”を渡したら、150フォームの移行が回り始めた話/登壇資料(高橋 悟生)
hacobu
PRO
1
430
GCASアップデート(202603-202605)
techniczna
0
280
AI時代に改めて考える、ドメイン駆動設計 - モデリングが「AIへの共通言語」になる
littlehands
7
2.3k
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
210
HDC tutorial
michielstock
2
670
How to make the Groovebox
asonas
2
2.2k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
530
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
180
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Why Our Code Smells
bkeepers
PRO
340
58k
Six Lessons from altMBA
skipperchong
29
4.2k
The SEO identity crisis: Don't let AI make you average
varn
0
470
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
150
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
130
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