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
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
540
Pandasによる競馬データの分析
anonaka
3
2.2k
PyCon APAC 2017へ行こう!
anonaka
0
760
Other Decks in Technology
See All in Technology
string地獄を脱出する
sansantech
PRO
1
110
A Harness for Behaviour: how to get AI to generate code that does what we intend, or "TDD in the age of AI"
xpmatteo
1
520
GitHub Copilot CLIでWebアクセシビリティを改善した話
tomokusaba
0
140
電子辞書Brainをネットに繋げてみた(自力編)
raspython3
0
390
Fabric-cicd によるAzure DevOps デプロイ
ryomaru0825
0
170
組織の中で自分を経営する技術
shoota
0
230
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
3
300
テストコードのないプロジェクトにテストを根付かせる
tttol
1
240
JEP 522 Deep Dive - G1 GC同期コスト削減によるスループット向上を徹底検証&解説
tabatad
1
480
脅威をエンジニアリングの糧にして:恐怖を乗り越えた先にあったもの / Turn threats into fuel for engineering: what lay beyond overcoming fear
nrslib
1
360
Platform engineering for developers, architects & the rest of us (AI agents)
danielbryantuk
0
160
Datadog 認定試験の概要と対策
uechishingo
0
210
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
830
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
Design in an AI World
tapps
1
220
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
150
WCS-LA-2024
lcolladotor
0
610
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
310
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
430
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
210
Making Projects Easy
brettharned
120
6.7k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
180
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*Λͬͨ໘ന͍ΞΠσΞืूதͰ͢ʂ