8000 adding place holders for samples · guptarohan41/botbuilder-python@047fdfc · GitHub
[go: up one dir, main page]

Skip to content

Commit 047fdfc

Browse files
committed
adding place holders for samples
1 parent 9f3207b commit 047fdfc

File tree

1 file changed

+21
-0
lines changed
  • samples/57.teams-conversation-bot

1 file changed

+21
-0
lines changed

samples/57.teams-conversation-bot/app.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,26 @@
55
import sys
66
import uuid
77
from datetime import datetime
8+
<<<<<<< HEAD
9+
=======
10+
from typing import Dict
11+
>>>>>>> 63f59b1... adding place holders for samples
812

913
from flask import Flask, request, Response
1014
from botbuilder.core import (
1115
BotFrameworkAdapterSettings,
1216
TurnContext,
1317
BotFrameworkAdapter,
1418
)
19+
<<<<<<< HEAD
1520
from botbuilder.schema import Activity, ActivityTypes
1621

1722
from bots import TeamsConversationBot
23+
=======
24+
from botbuilder.schema import Activity, ActivityTypes, ConversationReference
25+
26+
from bots import ProactiveBot
27+
>>>>>>> 63f59b1... adding place holders for samples
1828

1929
# Create the loop and Flask app
2030
LOOP = asyncio.get_event_loop()
@@ -56,13 +66,24 @@ async def on_error(context: TurnContext, error: Exception):
5666

5767
ADAPTER.on_turn_error = on_error
5868

69+
<<<<<<< HEAD
70+
=======
71+
# Create a shared dictionary. The Bot will add conversation references when users
72+
# join the conversation and send messages.
73+
CONVERSATION_REFERENCES: Dict[str, ConversationReference] = dict()
74+
75+
>>>>>>> 63f59b1... adding place holders for samples
5976
# If the channel is the Emulator, and authentication is not in use, the AppId will be null.
6077
# We generate a random AppId for this case only. This is not required for production, since
6178
# the AppId will have a value.
6279
APP_ID = SETTINGS.app_id if SETTINGS.app_id else uuid.uuid4()
6380

6481
# Create the Bot
82+
<<<<<<< HEAD
6583
BOT = TeamsConversationBot(APP.config["APP_ID"], APP.config["APP_PASSWORD"])
84+
=======
85+
BOT = ProactiveBot(CONVERSATION_REFERENCES)
86+
>>>>>>> 63f59b1... adding place holders for samples
6687

6788
# Listen for incoming requests on /api/messages.
6889
@APP.route("/api/messages", methods=["POST"])

0 commit comments

Comments
 (0)
0