tgsnake
TypeScript icon, indicating that this package has built-in type declarations

3.2.0 • Public • Published

tgsnakeicon
tgsnake is a modern MTProto framework for javascript or typescript.
github-repo telegram-chat
telegram-channel

Don't forget to read our FAQ in our site!!

Example :

  • Installation :
npx create-tgsnake-app myapp
  • Simple Hello World :
const { Snake } = require('tgsnake');
// import {Snake} from "tgsnake"
const bot = new Snake({
  apiHash: 'abcde', //your api hash
  apiId: 123456, // your api id
  logLevel: 'none', // logger level
});
bot.run(); //snake running
bot.on('msg.text', (ctx) => {
  //handle new message event.
  ctx.msg.reply('Hello World'); // reply with "Hello World"
  //console.log(ctx) // see json of message.
});

More example you can found in our website.

Contribution

Welcome, You can contribute to this project.

Reference

Thanks to all the frameworks and references that I use, several people who helped in developing this framework that I cannot mention one by one.

Build with ♥️ by tgsnake dev.

/tgsnake/

    Package Sidebar

    Install

    npm i tgsnake

    Weekly Downloads

    29

    Version

    3.2.0

    License

    MIT

    Unpacked Size

    387 kB

    Total Files

    138

    Last publish

    Collaborators

    • butthx