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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
630
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
940
JBUG東京#20 〜そこが知りたい!Backlog活用術〜
askul
1
3.7k
Other Decks in Technology
See All in Technology
契約書画像からの情報抽出に特化した視覚接地モデルを育てる話
sansantech
PRO
1
170
Getting Started with Google Antigravity
glaforge
0
210
FactoryBotアンチパターン / factory_bot anti-patterns
toshimaru
0
150
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
0
100
分析AIエージェントを育てる、動く環境を育てる
codatum
1
1k
go-sqletch
moznion
0
140
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
3
860
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
120
OSC2026on_the-world-is-waiting-for-your-voice.pdf
naruoga
0
370
[AWS 秋のクラウドオペレーション祭り 2026]AWS DevOps Agentで変わるリリースと運用対応 ~リリース管理機能と Directed actions のご紹介~
furuton
4
1.2k
Loop Engineering これくらいでいい
mikanichinose
0
230
しろおびから始める!ログ活用の第一歩
shumei_ito
0
910
Featured
See All Featured
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
590
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
The Cult of Friendly URLs
andyhume
79
7k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
620
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
470
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
940
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
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