Tgsend helps to send a message for all telegram bot users by part 800messages it creates send records from your users collection
Updates Here
npm install tgsend
or
yarn add tgsend
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
crontests