Spaces:
Build error
Build error
File size: 868 Bytes
0827183 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import List
from botbuilder.core import BotAdapter, TurnContext
from botbuilder.schema import Activity, ConversationReference, ResourceResponse
class NullAdapter(BotAdapter):
"""
This is a BotAdapter that does nothing on the Send operation, equivalent to piping to /dev/null.
"""
# pylint: disable=unused-argument
async def send_activities(
self, context: TurnContext, activities: List[Activity]
) -> List[ResourceResponse]:
return [ResourceResponse()]
async def update_activity(self, context: TurnContext, activity: Activity):
raise NotImplementedError()
async def delete_activity(
self, context: TurnContext, reference: ConversationReference
):
raise NotImplementedError()
|