tgsend
Version:
Tgsend helps to send a message for all telegram bot users by part 800messages it creates send records from your users collection
54 lines (34 loc) • 941 B
Markdown
Description
===========
*Tgsend* helps to send a message for all telegram bot users by part 800messages
it creates send records from your users collection
Updates
[](UPDATE.md)
Install
=======
`npm install tgsend`
or
`yarn add tgsend`
Examples
========
```javascript
const tgsend = require('tgsend');
// your send function
processSend(ctx) {
// conn with users collection
this.conn = createConnection(process.env.MONGO_URI_USERS);
// for broadcast collection
this.connSend = createConnection(process.env.MONGO_URI_NEW);
tgsend(ctx, this);
}
```
implemented https://github.com/albertincx/formatbot1
IMPORTANT
you should implement schema, toggleConfig, isAdmin, getMidMessage, forwardMes, sendAdmin methods
- create distribution records in mongo
- start distribution
- ~~cron~~
- ~~tests~~
https://www.npmjs.com/package/tgsend