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
PythonでSlack Bot
Search
anonaka
March 18, 2017
Technology
0
1k
PythonでSlack Bot
SlackBot sample to make a phone call and read text.
anonaka
March 18, 2017
Tweet
Share
More Decks by anonaka
See All by anonaka
Introduction to the data analysis using python
anonaka
0
1k
Rubyで電話をかける
anonaka
0
460
Pandasによる競馬データの分析
anonaka
3
2k
PyCon APAC 2017へ行こう!
anonaka
0
690
Other Decks in Technology
See All in Technology
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.3k
Engineer Career Talk
lycorp_recruit_jp
0
190
いざ、BSC討伐の旅
nikinusu
2
780
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
140
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
3
140
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
Zennのパフォーマンスモニタリングでやっていること
ryosukeigarashi
0
150
障害対応指揮の意思決定と情報共有における価値観 / Waroom Meetup #2
arthur1
5
480
DynamoDB でスロットリングが発生したとき_大盛りver/when_throttling_occurs_in_dynamodb_long
emiki
1
430
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
230
日経電子版のStoreKit2フルリニューアル
shimastripe
1
140
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
For a Future-Friendly Web
brad_frost
175
9.4k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
GitHub's CSS Performance
jonrohan
1030
460k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
100
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Become a Pro
speakerdeck
PRO
25
5k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Transcript
1ZUIPOͰ4MBDL#PU தɹ 909;0ΤόϯδΣϦετ
8IPBN* w ۭඈͿϓϩάϥϚ w גࣜձࣾ909;0ΤόϯδΣϦετ
None
None
"CPVU9PY[P κΫκʔʣ w ςϨϑΥχʔ"1*Λఏڙ͍ͯ͠·͢ w 909;0Ͱݕࡧͯ͠Ͷ
None
None
%&.0
#PU6TFST w 4MBDLͷ#PU6TFSΛ࡞͠ɺ"1*5PLFOΛೖख ͢Δ
४උ w QJQJOTUBMMTMBDLCPU w QJQJOTUBMMYPY[PDMPVEQZ w ʢిΛ͔͚ΔϥΠϒϥϦʣ
$ cat slack.py # -*- coding: utf-8 -*- import os
from slackbot.bot import respond_to, listen_to from xoxzo.cloudpy import XoxzoClient sid = os.environ.get("XOXZO_API_SID") auth_token = os.environ.get("XOXZO_API_AUTH_TOKEN") @listen_to('(.*)ʹʮ(.*)ʯͱిͯ͠') def hello(message, phonnum, msg): message.reply('%sʹʮ%sʯͱి͠·͢Ͷ' % (phonnum, msg)) xc = XoxzoClient(sid=sid, auth_token=auth_token) result = xc.call_tts_playback( tts_message=msg, tts_lang='ja', recipient="+81" + phonnum[1:], caller="+815012345678")
909;0ΞΧϯτ w "1*ͷར༻ʹ909;0ΞΧϯτʹαΠϯΞο ϓͯ͠ɺ4*%ͱΞΫηετʔΫϯͷೖख͕ඞཁͰ ͢ w IUUQTXXXYPY[PDPNKBBDDPVOUT TJHOVQ
909;0νʔϜ w ݱࡏ໊̔ w ΦϑΟεͳ͠ɻશһϦϞʔτϫʔΫ
None
None
͝੩ௌͲ͏ ͋Γ͕ͱ͏͍͟͝·ͨ͠ "1*Λͬͨ໘ന͍ΞΠσΞืूதͰ͢ʂ