python -m venv venv
On Windows
venv\Scripts\activate
On Unix or MacOS
source venv/bin/activate
pip install -r requirements.txt
Copy the .env.example
file to a new file named .env
and fill in your Discord and Telegram bot tokens and chat IDs.
from chat_base import ChatTransportDiscord, ChatTransportTelegram
# start polling Telegram bot
transport = ChatTransportTelegram(TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID)`
# or start polling Discord bot
# transport = ChatTransportDiscord(DISCORD_BOT_TOKEN, DISCORD_CHAT_ID)
# start the bot
bot = BusinessLogicController(transport)
asyncio.run(bot.run())
python chat_base.py --telegram
python chat_base.py --discord
python -m unittest .\tests_basics.py