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
790
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
750
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.2k
1on1をする上で大切なこと
askul
2
950
JBUG東京#20 〜そこが知りたい!Backlog活用術〜
askul
1
3.7k
Other Decks in Technology
See All in Technology
最近のMySQL事情について
yoku0825
1
320
SBOM 生成ツールで 2026 Minimum Elements はどこまで満たせるのか
gokken
0
180
データ界隈LT祭の運営のふりかえり
yoshimura_datam
0
120
20261119_AgentCore
takuyay0ne
2
360
ブース設計、 お前もプロダクトだったのか / So Booth Design Was a Product All Along
akihiro0038
0
200
AI時代に問い直す「プロダクションミーティング」の価値 〜チームでサービスの信頼性を高める取り組み〜
mackerelio
0
250
FPGAでアクティブセンシングがやりたくてカメラモジュールを自作した話
ryuz88
0
170
ワークフローからハーネスへ — Web フレームワークの作者たちが AI エージェントに向かう理由
azukiazusa1
4
3.9k
データから見る AI時代のエンジニア転職と採用
junya_okura
4
1.5k
現地速報! Microsoft Ignite アップデートレポート
kasada
1
740
不具合データを用いたプロダクトコードの弱点可視化
tarappo
6
350
AWS DevOps Agentの構造から読み解く運用 AI エージェントの設計原則/aws-devops-agent-design-principles
tomoki10
0
330
Featured
See All Featured
The Spectacular Lies of Maps
axbom
PRO
1
1.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
570
Docker and Python
trallard
47
4.3k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
680
Tell your own story through comics
letsgokoyo
1
1.1k
Product Roadmaps are Hard
iamctodd
55
13k
Automating Front-end Workflow
addyosmani
1370
210k
Leo the Paperboy
mayatellez
11
2.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The SEO Collaboration Effect
kristinabergwall1
1
630
The Pragmatic Product Professional
lauravandoore
37
7.5k