1.0.4 • Published 6 years ago

telegram-cms v1.0.4

Weekly downloads
1
License
GPL-3.0
Repository
github
Last release
6 years ago

Telegram-CMS

It is a nodejs application to launch a Telegram bot in seconds with primary components. I have been working on Telegram bots for almost 2 years and catched up most of needs for a chatbot. so I made this to solve lots of challenges and launching a bot easily. There is an ability to write your own modules on telegram-cms that I'll explain then. I'll complete this documentation during my tasks. but here is a simple "how to use"

Note

Sample Bots

How to use

  • Install it,
  • Create an app.js (or what ever you want)
  • Require it and start
    // this is your app.js file
    var tcms = require('telegram-cms');

    var option = {
        // mongo db path
        dbpath      :'mongodb://127.0.0.1:27017/telegram_cms',
        // bot token
        token       :'tokenxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        // bot username
        botusername :'username_bot',
        // activate modules
        modules:{
            'category'          :true,	// category module
            'post'              :true,	// post module
            'settings'          :true,	// setting module
            'search'            :true,	// search module
            'sendbox'           :true,	// contact form module
            'inbox'             :true,	// a module for send message to users
            'chanelChecker'     :true,	// a module for connecting to a channel
            'favorites'         :true,	// a module to make favorite (favorite posts, etc)
        },

        // web
        serverport:2002,	//express server, needed for commerce module

        // folders
        modulespath: require('path').join(__dirname, 'plugins'),	// If you write your own modules
    }
    
    // initialize the cms
    tcms.start(option);

comment events

    // if nothing to be routed by moduls,
    global.fn.eventEmitter.on('nothingtoroute', (message, speratedSection, user) => {});

    // if user send a command type message
    global.fn.eventEmitter.on('commands', (message) => {});

    // receive from inline mode
    global.fn.eventEmitter.on('inlineQuery', (InlineQuery) => {});

    // schedule an event
    global.fn.eventEmitter.emit('addtoschedule', code, date,  parameters, callback);
1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.9.9

6 years ago

0.9.8

6 years ago

0.9.7

6 years ago

0.9.6

6 years ago

0.9.5

6 years ago

0.9.4

6 years ago

0.9.3

6 years ago

0.9.2

6 years ago

0.9.1

6 years ago

0.9.0

6 years ago

0.8.9

6 years ago

0.8.8

6 years ago

0.8.7

6 years ago

0.8.6

6 years ago

0.8.5

6 years ago

0.8.4

6 years ago

0.8.3

6 years ago

0.8.2

6 years ago

0.8.1

6 years ago

0.8.0

6 years ago

0.7.9

6 years ago

0.7.8

6 years ago

0.7.7

6 years ago

0.7.6

6 years ago

0.7.5

6 years ago

0.7.4

6 years ago

0.7.3

6 years ago

0.7.2

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.9

6 years ago

0.6.8

6 years ago

0.6.7

6 years ago

0.6.6

6 years ago

0.6.5

6 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

7 years ago

0.5.9

7 years ago

0.5.8

7 years ago

0.5.7

7 years ago

0.5.6

7 years ago

0.5.5

7 years ago

0.5.4

7 years ago

0.5.3

7 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago