Skip to content

Commit

Permalink
support markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
n3d1117 committed Dec 5, 2022
1 parent bf81c23 commit 4ee6765
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion telegram_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ async def prompt(self, update: Update, context: ContextTypes.DEFAULT_TYPE):
logging.info('New message received')
await context.bot.send_chat_action(chat_id=update.effective_chat.id, action=telegram.constants.ChatAction.TYPING)
response = self.gpt3_bot.get_chat_response(update.message.text)
await context.bot.send_message(chat_id=update.effective_chat.id, text=response["message"])
await context.bot.send_message(
chat_id=update.effective_chat.id,
text=response["message"],
parse_mode=telegram.constants.ParseMode.MARKDOWN
)
logging.info('Sent response')

def run(self):
Expand Down

0 comments on commit 4ee6765

Please sign in to comment.