Bot¶
-
class
glados.bot.
GladosBot
(token, name, signing_secret=None, **kwargs)[source]¶ 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 (
Union
[str
,Dict
[str
,str
]]) – The bot tokensigning_secret (
Union
[str
,Dict
[str
,str
],None
]) – The bot signing secret.
-
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
-
signing_secret
¶ The bots signing secret.
- Type
str
-
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 tomessage (
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
) –