This bot greets new members on telegram groups with a cute, personalised gif with Senko-san.
In case you're wondering, Senko-san is an adorable 800-year old fox goddess from the anime The Helpful Fox Senko-san (jp. 世話やきキツネの仙狐さん).
Follow these steps to set up your own version of this bot.
For both development and runtime environments:
- Go 1.13 (see instructions)
- FFmpeg
sudo apt install ffmpeg -y
- Download and install the Google Cloud SDK, for example with Snap:
snap install google-cloud-sdk --classic gcloud init
- Clone the repo:
git clone https://github.com/4Kaze/telegram-senko-bot.git
- Download NotoSansCJKjp-Black.otf font into the project folder:
wget https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip -O fonts.zip unzip fonts.zip NotoSansCJKjp-Black.otf rm fonts.zip
- Deploy the bot to Google Cloud Functions replacing [YOUR TOKEN] with your bot token from BotFather:
gcloud functions deploy SenkoSan --entry-point=HandleRequest --runtime go113 --trigger-http --allow-unauthenticated --set-env-vars TOKEN=[YOUR TOKEN]
- If everything went well, there should be a trigger url in the output in your terminal:
Set this url as a webhook for your bot:
HttpsTrigger: url: https://us-central1-bot-tele-002137.cloudfunctions.net/SenkoSan
curl https://api.telegram.org/bot[YOUR TOKEN]/setWebhook?url=[YOUR URL]
The bot simply sends a gif with new member's name when they join a group.
In private messages, it supports the following commands:
/start
- a standard command that displays the description/genewate [name]
- a command that generates a new gif with given name/wepo
- a command that sends the link to this repo
All names are stripped from emojis, symbols and are truncated to be at maximum 20 characters.
I'm open for contributions. Feel free to fork the project to use it for your own means or to create a PR with new features / fixes.
Distributed under the MIT License. See LICENSE
for more information.