Skip to content

Releases: nitreojs/puregram

v2.21.0

07 Dec 20:32
Compare
Choose a tag to compare

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

27 Nov 20:35
Compare
Choose a tag to compare

puregram@2.20.2 (Nov 27, 2023)

  • fix(puregram): remove unnecessary async
  • chore(puregram): correctly use handleUpdate
  • feat(puregram): allow passing multiple middlewares to use

v2.20.1

20 Nov 09:56
Compare
Choose a tag to compare

puregram@2.20.1 (Nov 20, 2023)

  • fix(puregram): fix invalid pre

v2.20.0

03 Nov 19:45
Compare
Choose a tag to compare

puregram@2.20.0 (Nov 3, 2023)

  • fix(puregram): forgot to update init
  • chore(mixins): use Methods values as types
  • feat(puregram): allow passing Formattable values into text/caption

v2.19.0

01 Nov 19:34
Compare
Choose a tag to compare

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

31 Oct 06:02
Compare
Choose a tag to compare

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

09 Oct 00:28
Compare
Choose a tag to compare

puregram@2.17.0 (Oct 9, 2023)

  • chore(contexts): remove useless contexts
  • feat(mixins): introduce sendMedia in SendMixin
  • 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

05 Oct 18:40
Compare
Choose a tag to compare

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 management
    • ChatInviteControlMixin: all *ChatInviteLink methods
    • ChatSenderControlMixin: every method related to chat-sender stuff
    • PinsMixin: all the work related to pins (pinned messages)

v2.15.0

04 Oct 18:30
Compare
Choose a tag to compare

puregram@2.15.0 (Oct 4, 2023)

  • chore(contexts): add more service message events
  • feat(contexts): add isGeneralTopic()
  • chore: remind about @pureforum =)
  • feat(puregram): new InputMedia class
  • feat(puregram): introduce UpdatesFilter 🔥🔥nahh

v2.14.2

02 Oct 12:01
Compare
Choose a tag to compare

puregram@2.14.2 (Oct 2, 2023)

  • fix(puregram): add forum* updates as service messages (service_message)