Models¶
Note
Nearly all classes here have slots defined which means that it is impossible to have dynamic attributes to the data classes.
BaseView¶
View UI blocks
BaseView¶
- class slack.view.BaseView¶
Base class of view object.
This class carries abstract methods for all components.
New in version 1.4.0.
Placeholder¶
Select¶
- defto_dict
- class slack.view.Select¶
Represents a UI select menu with a list of custom options.
New in version 1.4.0.
- placeholder¶
Placeholder of select.
- Type
- options¶
Options to selections. Some type must be this attribute to select.
- Type
List[
SelectOption]
- select_type¶
Select type of this object.
- Type
SelectOption¶
- class slack.view.SelectOption¶
Option for select items.
New in version 1.4.0.
Enums¶
SelectType¶
- class slack.view.SelectType¶
Enums of select variety.
New in version 1.4.0.
ViewFrame¶
This is a frame of UI block.
ViewFrame¶
- class slack.view.ViewFrame¶
This class is base class for all components.
This class carries abstract methods for all components.
New in version 1.4.0.
View¶
- class slack.view.View¶
This is a frame of view block.
New in version 1.4.0.
- len(x)
Returns the total length of the blocks.
- bool(b)
Returns whether this has one or more blocks.
Example:
select = Select( action_id="action", placeholder=Placeholder( "text", mrkdwn=False, emoji=True), select_type=SelectType.users_select, initial_text="initial" ) view = View(select) await message.channel.send(view=view)