Open tenorok opened 6 years ago
I understood that in this approach we have a problem to pass the different target.id
for each messenger.
By the way, after this pull request we can pass only really needed parameters:
this.bot.sendText('Hello!', {
generator: {
id: ???, // ← id is a hard to search
name: 'telegram',
},
target: {
id: '49328423',
type: 'Person',
},
});
But generator.id
is hard to search and for simplification I offer to create a getIntegration()
-method:
this.bot.sendText('Hello!', {
generator: {
id: bot.getIntegration('telegram'),
name: 'telegram',
},
target: {
id: '49328423',
type: 'Person',
},
});
For example we registered a few messengers via
use
-method:And now we need to send message for all of these messengers:
How we can send message to all registered messengers at one time?
P.S.: Why
published
property is reduced by a thousand?(1) https://github.com/broidHQ/broid-kit/blob/master/src/core/Bot.ts#L111