glados.bot module¶
-
class
glados.bot.
GladosBot
(token, name, signing_secret=None, **kwargs)[source]¶ Bases:
object
GLaDOS Bot represents all the required data and functions for a Slack bot.
Notes
All Slack Web API functions can be called from MyBot.client.*
- Parameters
name (str) – The name of the bot (URL Safe)
token (str) – The bot token
client (WebClient) – A Slack client generated for that bot
-
name
¶ The name of the bot (URL Safe)
- Type
str
-
token
¶ The bot token
- Type
str
-
client
¶ A Slack client generated for that bot
- Type
WebClient
-
delete_message
(channel, ts)[source]¶ Deletes a message that was sent by a bot
- Parameters
channel (
str
) –ts (
str
) –
- Return type
SlackResponse
-
send_message
(channel, message)[source]¶ Send a message as the bot
- Parameters
channel (str) – channel to send the message to
message (Message) – message object to send
- Return type
SlackResponse
-
update_message
(channel, ts, message)[source]¶ Updates a message that was sent by the bot
- Parameters
channel (
str
) –ts (
str
) –message (
Message
) –
- Return type
SlackResponse
-
validate_slack_signature
(request)[source]¶ - Parameters
request (
GladosRequest
) –