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
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
580
Application Development WG Intro at AppDeveloperCon
salaboy
0
180
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
130
Lexical Analysis
shigashiyama
1
150
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
380
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
170
B2B SaaS × AI機能開発 〜テナント分離のパターン解説〜 / B2B SaaS x AI function development - Explanation of tenant separation pattern
oztick139
2
220
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
360
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
550
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
300
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
12k
Featured
See All Featured
Designing for humans not robots
tammielis
250
25k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Being A Developer After 40
akosma
86
590k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Happy Clients
brianwarren
98
6.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Speed Design
sergeychernyshev
24
610
The Cult of Friendly URLs
andyhume
78
6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
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*Λͬͨ໘ന͍ΞΠσΞืूதͰ͢ʂ