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
1.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PythonでSlack Bot
SlackBot sample to make a phone call and read text.
anonaka
March 18, 2017
More Decks by anonaka
See All by anonaka
Introduction to the data analysis using python
anonaka
0
1.2k
Rubyで電話をかける
anonaka
0
550
Pandasによる競馬データの分析
anonaka
3
2.3k
PyCon APAC 2017へ行こう!
anonaka
0
760
Other Decks in Technology
See All in Technology
勉強会企画をアプリで構造化してみた 〜そこで見えた、AIとの付き合い方〜 / I've structured a study group plan using an app.
pauli
0
340
AI Agent SaaS を支える自社仮想化基盤への挑戦と実運用 / ai-agent-saas-virtualization
flatt_security
2
3.6k
Road to SRE NEXTの今までとこれから
hiroyaonoe
0
290
小さいから、全部わかる。— 常駐AI "xangi" のすすめ
sugupoko
0
290
AI時代の EM への処方箋
staka121
PRO
0
110
「ちゃんとやっている」は独りよがりだった ― 不安に寄り添うインシデント対応へ / Towards incident response that addresses anxieties
chmikata
1
4.6k
Gen3R: 3D Scene Generation Meets Feed-Forward Reconstruction
spatial_ai_network
0
110
Claude Code公式skillで 自分の仕事を少しずつ手放そう!(Claude Code開発ノウハウ大公開スペシャル by クラスメソッド)
kaym
0
120
SRE依存からの脱却 運用を開 発チームへ移す、 フルサイ クル開 発体制の実践
joooee0000
0
2.5k
SRE Lounge Hiroshimaへの招待
grimoh
0
600
AWS Blocks を触ってみた/first-tach-aws-blocks
fossamagna
2
160
AI時代のエンジニアキャリアについて今一度考える
sakamoto_582
2
1.5k
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
220
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
The untapped power of vector embeddings
frankvandijk
2
1.8k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
320
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
230
Abbi's Birthday
coloredviolet
3
8.6k
New Earth Scene 8
popppiees
3
2.4k
It's Worth the Effort
3n
188
29k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
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*Λͬͨ໘ന͍ΞΠσΞืूதͰ͢ʂ