@@ -23,8 +23,10 @@ async def on_turn(self, turn_context: TurnContext):
2323 In a derived class, override this method to add logic that applies to all activity types.
2424
2525 .. note::
26- - Add logic to apply before the type-specific logic and before the call to the :meth:`ActivityHandler.on_turn()` method.
27- - Add logic to apply after the type-specific logic after the call to the :meth:`ActivityHandler.on_turn()` method.
26+ - Add logic to apply before the type-specific logic and before the call to the
27+ :meth:`ActivityHandler.on_turn()` method.
28+ - Add logic to apply after the type-specific logic after the call to the
29+ :meth:`ActivityHandler.on_turn()` method.
2830 """
2931 if turn_context is None :
3032 raise TypeError ("ActivityHandler.on_turn(): turn_context cannot be None." )
@@ -72,15 +74,17 @@ async def on_message_activity( # pylint: disable=unused-argument
7274
7375 async def on_conversation_update_activity (self , turn_context : TurnContext ):
7476 """
75- Invoked when a conversation update activity is received from the channel when the base behavior of :meth:`ActivityHandler.on_turn()` is used.
77+ Invoked when a conversation update activity is received from the channel when the base behavior of
78+ :meth:`ActivityHandler.on_turn()` is used.
7679
7780 :param turn_context: The context object for this turn
7881 :type turn_context: :class:`TurnContext`
7982
8083 :returns: A task that represents the work queued to execute
8184
8285 .. note::
83- When the :meth:'ActivityHandler.on_turn()` method receives a conversation update activity, it calls this method.
86+ When the :meth:'ActivityHandler.on_turn()` method receives a conversation update activity, it calls this
87+ method.
8488 If the conversation update activity indicates that members other than the bot joined the conversation,
8589 it calls the :meth:`ActivityHandler.on_members_added_activity()` method.
8690 If the conversation update activity indicates that members other than the bot left the conversation,
@@ -108,18 +112,20 @@ async def on_members_added_activity(
108112 self , members_added : List [ChannelAccount ], turn_context : TurnContext
109113 ): # pylint: disable=unused-argument
110114 """
111- Override this method in a derived class to provide logic for when members other than the bot join the conversation.
112- You can add your bot's welcome logic.
115+ Override this method in a derived class to provide logic for when members other than the bot join
116+ the conversation. You can add your bot's welcome logic.
113117
114- :param members_added: A list of all the members added to the conversation, as described by the conversation update activity
118+ :param members_added: A list of all the members added to the conversation, as described by the
119+ conversation update activity
115120 :type members_added: :class:`typing.List`
116121 :param turn_context: The context object for this turn
117122 :type turn_context: :class:`TurnContext`
118123
119124 :returns: A task that represents the work queued to execute
120125
121126 .. note::
122- When the :meth:'ActivityHandler.on_conversation_update_activity()` method receives a conversation update activity that indicates
127+ When the :meth:'ActivityHandler.on_conversation_update_activity()` method receives a conversation
128+ update activity that indicates
123129 one or more users other than the bot are joining the conversation, it calls this method.
124130 """
125131 return
@@ -128,43 +134,50 @@ async def on_members_removed_activity(
128134 self , members_removed : List [ChannelAccount ], turn_context : TurnContext
129135 ): # pylint: disable=unused-argument
130136 """
131- Override this method in a derived class to provide logic for when members other than the bot leave the conversation.
132- You can add your bot's good-bye logic.
137+ Override this method in a derived class to provide logic for when members other than the bot leave
138+ the conversation. You can add your bot's good-bye logic.
133139
134- :param members_added: A list of all the members removed from the conversation, as described by the conversation update activity
140+ :param members_added: A list of all the members removed from the conversation, as described by the
141+ conversation update activity
135142 :type members_added: :class:`typing.List`
136143 :param turn_context: The context object for this turn
137144 :type turn_context: :class:`TurnContext`
138145
139146 :returns: A task that represents the work queued to execute
140147
141148 .. note::
142- When the :meth:'ActivityHandler.on_conversation_update_activity()` method receives a conversation update activity that indicates
143- one or more users other than the bot are leaving the conversation, it calls this method.
149+ When the :meth:'ActivityHandler.on_conversation_update_activity()` method receives a conversation
150+ update activity that indicates one or more users other than the bot are leaving the conversation,
151+ it calls this method.
144152 """
145153
146154 return
147155
148156 async def on_message_reaction_activity (self , turn_context : TurnContext ):
149157 """
150- Invoked when an event activity is received from the connector when the base behavior of :meth:'ActivityHandler.on_turn()` is used.
151-
158+ Invoked when an event activity is received from the connector when the base behavior of
159+ :meth:'ActivityHandler.on_turn()` is used.
152160
153161 :param turn_context: The context object for this turn
154162 :type turn_context: :class:`TurnContext`
155163
156164 :returns: A task that represents the work queued to execute
157165
158166 .. note::
159- Message reactions correspond to the user adding a 'like' or 'sad' etc. (often an emoji) to a previously sent activity.
160- Message reactions are only supported by a few channels. The activity that the message reaction corresponds to is indicated in the
161- reply to Id property. The value of this property is the activity id of a previously sent activity given back to the bot as the response
162- from a send call.
163- When the :meth:'ActivityHandler.on_turn()` method receives a message reaction activity, it calls this method.
164- If the message reaction indicates that reactions were added to a message, it calls :meth:'ActivityHandler.on_reaction_added().
165- If the message reaction indicates that reactions were removed from a message, it calls :meth:'ActivityHandler.on_reaction_removed().
167+ Message reactions correspond to the user adding a 'like' or 'sad' etc. (often an emoji) to a previously
168+ sent activity.
169+ Message reactions are only supported by a few channels. The activity that the message reaction corresponds
170+ to is indicated in the reply to Id property. The value of this property is the activity id of a previously
171+ sent activity given back to the bot as the response from a send call.
172+ When the :meth:'ActivityHandler.on_turn()` method receives a message reaction activity, it calls this
173+ method.
174+ If the message reaction indicates that reactions were added to a message, it calls
175+ :meth:'ActivityHandler.on_reaction_added().
176+ If the message reaction indicates that reactions were removed from a message, it calls
177+ :meth:'ActivityHandler.on_reaction_removed().
166178 In a derived class, override this method to add logic that applies to all message reaction activities.
167- Add logic to apply before the reactions added or removed logic before the call to the this base class method.
179+ Add logic to apply before the reactions added or removed logic before the call to the this base class
180+ method.
168181 Add logic to apply after the reactions added or removed logic after the call to the this base class method.
169182 """
170183 if turn_context .activity .reactions_added is not None :
@@ -225,7 +238,8 @@ async def on_reactions_removed( # pylint: disable=unused-argument
225238
226239 async def on_event_activity (self , turn_context : TurnContext ):
227240 """
228- Invoked when an event activity is received from the connector when the base behavior of :meth:'ActivityHandler.on_turn()` is used.
241+ Invoked when an event activity is received from the connector when the base behavior of
242+ :meth:'ActivityHandler.on_turn()` is used.
229243
230244 :param turn_context: The context object for this turn
231245 :type turn_context: :class:`TurnContext`
@@ -254,7 +268,8 @@ async def on_token_response_event( # pylint: disable=unused-argument
254268 self , turn_context : TurnContext
255269 ):
256270 """
257- Invoked when a `tokens/response` event is received when the base behavior of :meth:'ActivityHandler.on_event_activity()` is used.
271+ Invoked when a `tokens/response` event is received when the base behavior of
272+ :meth:'ActivityHandler.on_event_activity()` is used.
258273 If using an `oauth_prompt`, override this method to forward this activity to the current dialog.
259274
260275 :param turn_context: The context object for this turn
@@ -263,8 +278,9 @@ async def on_token_response_event( # pylint: disable=unused-argument
263278 :returns: A task that represents the work queued to execute
264279
265280 .. note::
266- When the :meth:'ActivityHandler.on_event()` method receives an event with an activity name of `tokens/response`,
267- it calls this method. If your bot uses an `oauth_prompt`, forward the incoming activity to the current dialog.
281+ When the :meth:'ActivityHandler.on_event()` method receives an event with an activity name of
282+ `tokens/response`, it calls this method. If your bot uses an `oauth_prompt`, forward the incoming
283+ activity to the current dialog.
268284 """
269285 return
270286
@@ -304,8 +320,8 @@ async def on_unrecognized_activity_type( # pylint: disable=unused-argument
304320 self , turn_context : TurnContext
305321 ):
306322 """
307- Invoked when an activity other than a message, conversation update, or event is received when the base behavior of
308- :meth:`ActivityHandler.on_turn()` is used.
323+ Invoked when an activity other than a message, conversation update, or event is received when the base
324+ behavior of :meth:`ActivityHandler.on_turn()` is used.
309325 If overridden, this method could potentially respond to any of the other activity types.
310326
311327 :param turn_context: The context object for this turn
@@ -314,7 +330,7 @@ async def on_unrecognized_activity_type( # pylint: disable=unused-argument
314330 :returns: A task that represents the work queued to execute
315331
316332 .. note::
317- When the :meth:`ActivityHandler.on_turn()` method receives an activity that is not a message, conversation update, message reaction,
318- or event activity, it calls this method.
333+ When the :meth:`ActivityHandler.on_turn()` method receives an activity that is not a message,
334+ conversation update, message reaction, or event activity, it calls this method.
319335 """
320336 return
0 commit comments