slackmail/slack/chat.py

12 lines
301 B
Python

#
# Copyright 2015 (c) Anna Schumaker.
#
from . import api
from . import auth
from urllib import request
def postMessage(channel, text):
post = request.quote(text)
api.call("chat.postMessage", token = auth.token(), channel = channel,
text = post, as_user = True, parse = "full")