GithubHelp home page GithubHelp logo

sahil3212 / telegram-senko-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 4kaze/telegram-senko-bot

0.0 0.0 0.0 230 KB

A bot that greets new members on telegram groups with a cute, personalised gif.

License: MIT License

Go 100.00%

telegram-senko-bot's Introduction

Telegram-senko-bot

MIT License Telegram Demo build-shield

UwU! An example!

About The Bot

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. 世話やきキツネの仙狐さん).

Getting Started

Follow these steps to set up your own version of this bot.

Prerequisites

For both development and runtime environments:

  • Go 1.13 (see instructions)
  • FFmpeg
    sudo apt install ffmpeg -y

Set up using Google Cloud Functions

  1. Download and install the Google Cloud SDK, for example with Snap:
    snap install google-cloud-sdk --classic
    gcloud init
  2. Clone the repo:
    git clone https://github.com/4Kaze/telegram-senko-bot.git
  3. 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
  4. 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]
  5. If everything went well, there should be a trigger url in the output in your terminal:
    HttpsTrigger:
        url: https://us-central1-bot-tele-002137.cloudfunctions.net/SenkoSan
    
    Set this url as a webhook for your bot:
    curl https://api.telegram.org/bot[YOUR TOKEN]/setWebhook?url=[YOUR URL]

Usage

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.

Contributing

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.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Chat on Telegram

Acknowledgements

telegram-senko-bot's People

Contributors

4kaze avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.