Exemple #1
0
 def message_control(state: DungeonViewState):
     if state is None:
         return None
     return EmbedControl(
         [DungeonView.embed(state)],
         DungeonMenuPanes.emoji_names()
     )
Exemple #2
0
 def message_control(state: SimpleTextViewState):
     if state is None:
         return None
     return EmbedControl(
         [SimpleTextView.embed(state)],
         state.reaction_list
     )
Exemple #3
0
 def id_control(state: IdViewState):
     if state is None:
         return None
     return EmbedControl(
         [IdView.embed(state)],
         state.reaction_list or NaDiffMenuPanes.emoji_names()
     )
Exemple #4
0
 def button_info_control(state: ButtonInfoViewState):
     if state is None:
         return None
     reaction_list = ButtonInfoMenuPanes.get_user_reaction_list(state.display_options)
     return EmbedControl(
         [ButtonInfoView.embed(state)],
         reaction_list
     )
Exemple #5
0
 def awakening_list_control(state: AwakeningListViewState):
     if state is None:
         return None
     reaction_list = AwakeningListMenuPanes.get_user_reaction_list(
         state.sort_type)
     return EmbedControl([AwakeningListView.embed(state)], reaction_list)
Exemple #6
0
 def message_control(state: ClosableEmbedViewState):
     view = view_types[state.view_type]
     return EmbedControl([view.embed(state, state.props)], [])
 def message_control(cls, state):
     view = cls.view_types[state.view_type]
     return EmbedControl([view.embed(state, state.props)], [])