GithubHelp home page GithubHelp logo

daffaalam / telegram-menfess-apps-script Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 9.0 16 KB

A simple script for Telegram Auto Base (menfess) bot with Google Apps Script (GAS).

Home Page: https://t.me/tgfessbot

License: The Unlicense

JavaScript 100.00%
bot gas telegram google-apps-script telegram-bot autobase menfess

telegram-menfess-apps-script's Introduction

Telegram Auto Base Library for GAS (Google Apps Script)

Installation

Go to Resources then Libraries in your GAS (Google Apps Script) project menus, Search and Add this to your library, don't forget to choose the latest version.

1qsU5g_0LEEeDBLv0MUU1Noh90zIsJSdFVg9vU7uheC34Mn5_-tFN5Adk

Copy this code to your project.

const tg = TelegramAutoBase.init({
    token: 'BOT-TOKEN',
    channel: 'CHANNEL-USERNAME',
    exec: 'WEB-APP-DEPLOY-ID',
});

function doGet(e) { tg.doGet(e) }

function doPost(e) { tg.doPost(e) }

function setWebhook() { tg.setWebhook() }

function deleteWebhook() { tg.deleteWebhook() }

Change BOT-TOKEN, CHANNEL-USERNAME, and WEB-APP-DEPOY-ID with your own.

Required data on init:

  • token, your API Token (Telegram Bot).
  • channel, your channel username (without @).
  • exec, your script executable id (get from URL after you Deploy As Web App).

Optional:

  • admin, your user or private group ID.
    default is -1001385703290 (my group).
  • trigger, your trigger message will be forwarded.
    default is '' (no trigger, all message will forwarded).
  • thanks, your feedback message after the message is forwarded to channel.
    default is 'Thanks for using this bot, your message will be sent immediately to @channel'.
  • report, your feedback message after the message is forwarded to admin.
    default is 'Thanks for using this bot, your message will be sent immediately to Admin.'.
  • invalid, your feedback message if the trigger is set and user send the message without trigger.
    default is 'Your message does not contain trigger words.'.

Then run or execute setWebhook function.

Example

Make sure your project is like this.

Author

Donations

Saweria - daffaalam

License

This is free and unencumbered public domain software. For more information, see https://unlicense.org/ or the accompanying UNLICENSE file.

telegram-menfess-apps-script's People

Contributors

daffaalam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.