A bot that uses Markov chains to generate messages based on those sent during the conversation.
My TG channel - Click
After adding to the conversation, the bot creates a text document with all the words that you write in the conversation.
Next, using an algorithm, a message is generated from these words using the Markov chain method. You can generate messages yourself, or you can configure the chance of a response to a message in config.
citatgen
- Random message generation.
citatgen <number>
- Generating a random message from a certain number of words.
git clone https://github.com/droptrigger/telegram-markov-chain-message-generator.git
pip install aiogram
pip install numpy
3. Go to https://t.me/BotFather and we create a bot. We allow you to invite him to the channels (It should be enabled
).
5. In config enter this token instead of a pass. Setting up variables.
The bot will not be able to generate quotes for the first 3-10 messages, as there are not enough words for it :)