src

src module

src.config.load_config() → dict

Reads and returns the contents of the config file.

Returns

The config file as a dict.

Return type

dict

class src.flameboi.FlameboiSlackApi

Methods used to control various features with the Flameboi Slack bot API.

add_member(user_email: str) → dict

This method does not work yet. Enterprise grid access is required for the app to be able to add/remove users from the team.

Adds a member to the workspace using their member ID.

Parameters

user_email (str) – The Slack ID of the user.

Returns

The response of the member addition request.

Return type

dict

get_channel_id(channel_name: str) → str

Returns the channel ID based on the name. If no ID is found, then none is returned.

Parameters

channel_name (str) – The name of the channel as a string (w/o the leading hashtag).

Returns

The channel id as a string.

Return type

str

get_channel_list() → dict

Returns the list of channels available to the bot.

Returns

The list of channels as a dict.

Return type

dict

get_slack_client()

Returns the slack web client. Used for if the commands in this module do not suffice for specific use cases.

Returns

The slack client.

Return type

slack.WebClient

get_user_by_email(email: str) → dict

Retrieves a user by their email.

Parameters

email (str) – The email address of the user.

Returns

The user as a dict.

Return type

dict

get_users_list() → dict

Returns a list of users.

Returns

A list of users. See https://api.slack.com/methods/users.list for format.

Return type

dict

send_onboarding_message(user_email: str) → dict

Sends the onboarding message to a user.

Parameters

user_email (str) – The email of the user to be on-boarded.

Returns

The response from the message request as a dict.

Return type

dict