Models¶
Note
Nearly all classes here have slots defined which means that it is impossible to have dynamic attributes to the data classes.
Messages¶
Message¶
- class slack.Message¶
This function is a constructor for the Message class. It takes in two parameters, state and data. The state parameter is a ConnectionState object, and the data parameter is a MessagePayload object. The function then sets the state, team_id, id, author, channel_id, and created_at attributes of the Message object
- created_at¶
Message created at.
- Type
datetime
DeletedMessage¶
JoinMessage¶
- class slack.JoinMessage¶
This function is a constructor for the JoinMessage class. It takes in a ConnectionState and a JoinMessagePayload as parameters and sets the author of the message to the user in the JoinMessagePayload
ArchivedMessage¶
Channels¶
- asyncarchive
- asyncsend
- asyncsend_as_user
- class slack.Channel¶
This function is a constructor for the Channel class. It takes in a ConnectionState object and a ChannelPayload object. It sets the state, id, name, team, created_at, and created_by attributes of the Channel object. It then calls the overload function
- created_at¶
When create this channel.
- Type
datetime
- await archive()¶
This channel archive.
DeletedChannel¶
Teams¶
- asynccreate_channel
- class slack.Team¶
This function takes in a TeamPayload object and sets the data attribute of the Team object to the TeamPayload object
Icon¶
Members¶
- class slack.Member¶
This function takes in a UserPayload object and assigns it to the data attribute of the User class