Releases: nitreojs/puregram
Releases · nitreojs/puregram
v2.21.0
puregram@2.21.0 (Dec 7, 2023)
- feat(puregram): add
suppress
to ignore errors - chore(contexts): eliminate extra imports
- feat(puregram): downloading attachments
v2.20.2
v2.20.1
v2.20.0
v2.19.0
puregram@2.19.0 (Nov 1, 2023)
- feat(puregram): introduce hooks
// set `parse_mode: 'html'` for every `sendMessage` request
telegram.onBeforeRequest((context) => {
if (context.path === 'sendMessage') {
context.params.parse_mode = 'html'
}
return context
})
telegram.updates.on('message', (context) => {
return context.reply('this will be <b>automatically bold</b>!')
})
v2.18.0
puregram@2.18.0 (Oct 31, 2023)
- feat(puregram): introduce
MessageEntities
telegram.updates.on('message', (context) => {
if (!context.hasEntities()) {
return
}
if (!context.entities.has('pre')) {
return context.reply('no ``` tags found')
}
if (context.entities.with({ language: 'js' }).isEmpty()) {
return context.reply('no ```js tags found')
}
return context.reply(JSON.stringify(context.entities.only('pre').with({ language: 'js' }).toJSON()))
})
v2.17.0
puregram@2.17.0 (Oct 9, 2023)
- chore(contexts): remove useless contexts
- feat(mixins): introduce
sendMedia
inSendMixin
- feat(media-source): add
base64
->buffer
- chore(updates): drop if
409 Conflict: terminated
- feat(mixins): remove non-media methods, add
InputMedia
support
v2.16.0
puregram@2.16.0 (Oct 5, 2023)
- feat(mixins): add
ForumMixin
— topic-related methods - feat(mixins): add
ChatMemberControlMixin
—*ChatMember
methods (i.e.banMember
,restrictMember
) - feat(mixins): add a lot of mixins...
ChatControlMixin
: all the methods responsible for chat managementChatInviteControlMixin
: all*ChatInviteLink
methodsChatSenderControlMixin
: every method related to chat-sender stuffPinsMixin
: all the work related to pins (pinned messages)