Fork of markov chain Telegram bot for local VR chat
Перейти к файлу
Gitea 43720c7c1b message: disable uniqueness check 2020-03-24 17:45:24 +01:00
cfg cfg: extend docker config 2020-03-24 17:40:44 +01:00
resources cfg: make fisting is 00 possible 2020-03-24 17:41:04 +01:00
src message: disable uniqueness check 2020-03-24 17:45:24 +01:00
storage Better file structure 2017-04-18 23:40:40 +03:00
.gitignore update .gitignore 2017-08-05 07:30:41 +03:00
Dockerfile Merge branch 'master' of github.com:telegram-bots/imaginaryfriend 2017-08-18 01:56:33 +03:00
README.md Bot reply fix 2017-04-21 22:51:13 +03:00
docker-compose.yml docker: fix redis vulnerability 2020-03-24 17:39:17 +01:00
requirements.txt Bump pillow from 4.2.1 to 6.2.0 2019-10-22 21:02:28 +00:00
run.py [WIP] #19 Updated readme, config and requirements 2016-12-27 22:16:15 +03:00

README.md

My great plan is to create a Telegram chat bot that would be like shizoid, but in Python and maybe with some extra features.

A-a-a-a-and... it works (@ImaginaryFriendBot)! Thanks to @REDNBLACK.

Features

ImaginaryFriend can:

  • reply to random messages in chat groups,
  • reply to replies to its messages / messages mentioning it,
  • send (one!) sticker ("I'm frustrated by all these stickers"),
  • detect repeating media files and send [:||||||||||||:] to chat,
  • do some commands.

Examples

– @ImaginaryFriendBot один ты меня понимаешь
– Ты глупый кот. Меня зовут антон иванов, мне только что поймала ту же пустоту.
– привет, Антон
– Привет!
– оч приятно, Антон. Я Боря
– Я не знаю юридических тонкостей но по факту квартира же твоя! Боря кот. Оч приятно антон.
– Чем ты занимаешься, ты юрист?
– Ты не видишь чтоль?
– Ну извини, решил уточнить. Как дела то?
– Как дела с потоками в яве обстоят? Ну ты понел. Дела отлично, а твои как?
– Нет. У меня друг в дестве кусался.
– он тебя загрыз?
– Он же говна кусок.
– тебя загрыз кусок говна?
– Тебя наверх задрать надо.
– ты сегодня особо в тему пишешь, что с тобой, ты поумнел?
– Что бы крашилось :3?
– да ты суицидник XD
– Ты не очень умный?
– годный бот
– Бот захватит мир.

Commands

  • /ping: you know the drill,
  • /get_stats: get information on how many pairs are known by ImaginaryFriend,
  • /chance n: set the probability that ImaginaryFriend would reply to a random message (must be in range 1-50, default: 5),
  • /сhance: get current probability that ImaginaryFriend would reply to a message,
  • /mod_f pattern: find all the words starting with pattern,
  • /mod_d word: remove word from ImaginaryFriend's dictionary,
  • /meow, /woof, /borscht, /boobs, /butts and others: make ImaginaryFriend send a corresponding picture,
  • /vzhuh phrase: make ImaginaryFriend create a вжух meme.

Installation and Setup

Setup using Docker

  1. Install Docker
  2. Open cfg dir and rename main.docker.cfg.example to main.docker.cfg.
  3. Talk to @botfather and create your own bot.
  4. Open main.docker.cfg file in text editor, paste your newly created bot token into bot.token property and your bot name (with Bot postfix) into bot.name property.
  5. Execute docker-compose up. Congrats! You now have ImaginaryFriend of your own!

Setup without Docker

  1. Install Python >= 3.5.2
  2. Install Redis >= 3.2
  3. Install dependencies with PIP by executing command pip install -r requirements.txt
  4. Open cfg dir and rename main.plain.cfg.example to main.plain.cfg
  5. Talk to @botfather and create your own bot.
  6. Open main.plain.cfg file in text editor, paste your newly created bot token into bot.token property and your bot name (with Bot postfix) into bot.name property.
  7. (Optionally) Configure updates property for websocket support and redis property to point to your Redis instance.
  8. Execute the python run.py