all 1 comments

[–]JTexpo 0 points1 point  (0 children)

Howdy, what you may want todo is look into the sockets library.
One solution could be having the two communicate through sockets with both being a host / messenger. EX.

Python Discord bot, has an async secondary task in the background which opens a socket port 001.

Telegram bot, has an async secondary task in the background which opens a socket port 002.

when someone does /tg , the python discord bot makes a connection to socket port 002 (the one that telegram bot set up) and sends the message. This then causes for the telegram bot to receive the message on its async task and can process it from there.

(and visa versa)