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
760
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
570
EditorConfigで導くコードの「美しさ」
askul
0
700
いまさら聞けないAWS
askul
0
6.7k
CTOが語る、テックカンパニーに向けた未来の話。by アスクル
askul
0
230
チームでリーダブルコードを実現するには?
askul
0
3.4k
ラズパイを使ってスマートリモコンを作ってみた
askul
0
900
10分で「エラスティックリーダーシップ」をアウトプット
askul
1
4k
1on1をする上で大切なこと
askul
2
930
JBUG東京#20 〜そこが知りたい!Backlog活用術〜
askul
1
3.6k
Other Decks in Technology
See All in Technology
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
190
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
1.5k
絵ではじめるKubernetesセキュリティ
aoi1
3
560
Issue 駆動でスペシャリストの意図を届ける、AI 実装のアクセシビリティ向上
thkt
0
110
30座EKS, 180次升級淬煉的EKS Upgrade Skill 的歷程
eric8230
0
160
2026_devsumi_ozono.pdf
o3
3
500
安心して変更できるWebフロントエンドの作り方
pirosikick
4
2.5k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
12k
SQL文一行も書けない人事がCortexもろもろを使って人事業務を楽にしてみる
ponponmikankan
1
240
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
3
500
MCPをつなげて作る組織横断のAIエージェント基盤(の開発工程)
tsubakimoto_s
0
130
GoにおけるFFIのこれまでとこれから
goccy
5
3.3k
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
670
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
350
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
660
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.9k
Exploring anti-patterns in Rails
aemeredith
4
510
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
570
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
KATA
mclloyd
PRO
35
15k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.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