Silly telegram bot. Will welcome new users in the group and notify if someone has left. Users can propose posts to the channel with private messages.
https://t.me/fumofumo_plush_bot
- Python 3 with asyncio, data validation and typing
- aiogram 3
- sqlalchemy asyncio wth SQLite for development or Postgres for production
- Docker and Docker Compose
- GitHub workflow linter and build
TELEGRAM_BOT_TOKEN=Your_token
LOG_LEVEL=INFO
loglevelADMIN_CHAT_ID=238637902
To get ADMIN_CHAT_ID start bot and send him /id commandHASH_SALT
Optional salt for hashing.TIMEZONE
Timezone for scheduler and commands that work with time. If not provided - UTC timezone wil be used.
POSTGRES_HOST
postgress db hostPOSTGRES_PORT
postgress db portPOSTGRES_DB
postgress db namePOSTGRES_USER
postgress db userPOSTGRES_PASSWORD
postgress db password
messages located in file app/messages.yml and can be redefined using docker volume. user_full_name will be replaced with user full name
To add fumos to db start bot and send him /add_fumos command from admin. Send fumo images with names. Telegram allows sharing stickers between bots, but each bot has a unique file_id for other media, so you have to re-upload them.
docker run -it --rm \
--env TELEGRAM_BOT_TOKEN="Your_token" \
--env ADMIN_CHAT_ID=238637902 \
ghcr.io/fstream7/fumofumo_plush_bot:main
docker run --detach --restart=always \
--env TELEGRAM_BOT_TOKEN="Your_token" \
--env ADMIN_CHAT_ID=238637902 \
--name fumofumo_plush_bot \
ghcr.io/fstream7/fumofumo_plush_bot:main
- Clone repo:
git clone [email protected]:Fstream7/fumofumo_plush_bot.git
- Add env:
export TELEGRAM_BOT_TOKEN="Your_token"
export ADMIN_CHAT_ID=238637902
- Run with local python
pip3 install requirements.txt
cd app/
alembic upgrade head
python main.py
Or with docker compose
# for development, with sqlite
docker compose -f docker-compose-dev.yml up
# for production, with postgres
docker compose -f docker-compose.yml up -d
/id
will return current chat id/fumo
will return random fumo face ᗜᴗᗜ/fumofumo
will return fumo of the day based on day and user id.
/get_stickers_id
FSM, will return given sticker id/add_fumo
FSM for adding fumos to db/cancel
exit from FSM/list_fumos
list all fumos in db./list_fumos name
list fumos by name in db. List all if name not provided./update_fumo_cache
Fumos cache updating daily, you can manually update it with this command/download_fumo_images name
Download fumo images from bot. For backup or transfer between bots. Download all if name not provided./import_fumo_images name
Import fumo images. Bot will uppload images located in media/photos/ and add/update file_id to db. Import all if name not provided. Can be used for mass image update of transfer images between bots.