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
780
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
Transcript
8 slides
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
More Decks by ASKUL Engineer
See All by ASKUL Engineer
組織における AI-DLC 実践
askul
0
730
EditorConfigで導くコードの「美しさ」
askul
0
710
いまさら聞けないAWS
askul
0
6.8k
CTOが語る、テックカンパニーに向けた未来の話。by アスクル
askul
0
240
チームでリーダブルコードを実現するには?
askul
0
3.5k
ラズパイを使ってスマートリモコンを作ってみた
askul
0
920
10分で「エラスティックリーダーシップ」をアウトプット
askul
1
4.1k
1on1をする上で大切なこと
askul
2
950
JBUG東京#20 〜そこが知りたい!Backlog活用術〜
askul
1
3.7k
Other Decks in Technology
See All in Technology
メール到達性を支える、リンク先URLのドメイン評価の扱い方
wind111
0
160
マネジメントされる側の仕事は「文句」を言うこと
riyaamemiya
7
5.8k
「個社」ではなく「業界」の課題を解く AI 対話開発 ー 価値を広げる設計と、価値を守るエンジニアリング ー
ivry_presentationmaterials
3
670
異夢同船〜異なる夢でも同じ船でなんとかする〜
fortegp05
1
520
あの日、見つかっていなかったらどうなっていたか
kazzpapa3
2
260
cdkdがどんだけ早いか、実際に動かして見てみよう
smt7174
1
130
AWS Client VPNの設定でハマったポイントとその過程での気づき
amarelo_n24
1
390
Linuxネットワークスタック進化の軌跡: 過去10年の歩みと最新トレンド
orimanabu
4
750
こんなに変わった! AWSネットワークの常識
shotashiratori
16
10k
IP重複は"ランディングVPC"で受け止める ― PrivateLink と Transit Gatewayによるマルチテナント接続基盤の設計
hatahata021
3
250
Agent Harnessはどう作る?事例から学ぶAI Agentの設計思想
sergicalsix
0
350
Kansai WordPress Meetup@大阪『ブロックテーマを作る上で知っておくべきこと
torounit
0
250
Featured
See All Featured
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
310
Docker and Python
trallard
47
4.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Designing for Timeless Needs
cassininazir
1
570
Optimising Largest Contentful Paint
csswizardry
37
4k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
350
エンジニアに許された特別な時間の終わり
watany
109
250k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
340
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.8k