Skip to content

ar2rworld/NemoBot

Repository files navigation

NemoBot

Hello there, just a simple telegram bot friends conversation

Has a youtube notificator feature by subscribing to pubsubhubbub's rss to send a message about new uploaded videos.

Able to echo some phrases to the chat if key words were found

50/50 chance commands

id: nemo4_bot

Technologies:

  • Python 3.11.4
    • redis
    • requests-html
    • pymongo
    • python-telegram-bot
    • python-twitter
    • requests
    • defusedxml
  • Redis
  • MongoDB

Run with poetry:

    poetry env use 3.11.4
    poetry install
    poetry run python NemoBot.py

If you have your poetry not working, try reinstalling.

If

poetry/1.7.1/libexec/lib/python3.12/site-packages/poetry/utils/env/base_env.py", line 15, in <module>
    from virtualenv.seed.wheels.embed import get_embed_wheel
ModuleNotFoundError: No module named 'virtualenv'

do poetry/1.7.1/libexec/bin/python3.12 -m pip install virtualenv

Commands:

/help - to find out more commands

Supports commands for social media posts:

API keys required

(Not in service for now)

  • linkedin.com
  • vk.com???
  • twitter.com

/my_telegram_id

Sends chat model right from API

Deploy with docker-compose

Customize and rename template.env to .env file

Command

docker-compose up -d

TODO:

  • +- Tests
  • + Run linters
  • + Push container to registry
  • Deploy to server
  • Add alerts
  • Add metrics

Linters:

    pre-commit run -a
    pre-commit run   [hook]

For other commands:

/help

Autopulling and restarting services

Add docker-compose-pull.sh to your project directory

#!/bin/bash
cd <PROJECT_DIR>
docker-compose pull
docker-compose up -d

Add crontab job to pull and run containers with crontab -e

*/5  * * * * <PROJECT_DIR>/docker-compose-pull.sh

Don't forget to add execute permission

chmod +x <PROJECT_DIR>/docker-compose-pull.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published