Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sticker info #2723

Open
1 task done
diegofemello opened this issue Jan 12, 2024 · 1 comment
Open
1 task done

Sticker info #2723

diegofemello opened this issue Jan 12, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@diegofemello
Copy link

diegofemello commented Jan 12, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe.

Is there any way to get the sticker info when retrieving the message? like the name and author from the message data?
I'm creating a guessing game with stickers, and recovering this data would help a lot.

Describe the solution you'd like.

image

in quoted raw

console.log(message)

Message {
  _data: {
  ....,
    quotedMsg: {
      type: 'sticker',
      // caption: "◓ caption test", // perfect solution for what I need
      stickerAuthorName: "Bit Bot Stickers",
      stickerName: "◓ Quem é esse pokemon?"
    }
  }
}

or when getting quoted info:
(not so much performatic, but it would solve the problem)

const quoted = message.getQuotedMessage()
console.log(quoted)

Message {
 ...,
 type: 'sticker',
 stickerAuthorName: "Bit Bot Stickers",
 stickerName: "◓ Quem é esse pokemon?"
}

Describe an alternate solution.

It would also help if I could hide information in the message/sticker, then I would send it with a "secret" that I chose or a caption inside sticker

Additional context

No response

@diegofemello diegofemello added the enhancement New feature or request label Jan 12, 2024
@Nurutomo
Copy link

Nurutomo commented Mar 3, 2024

see #511 and #527

const img = new webp.Image()
await img.loadBuffer(WEBP_IMAGE_BUFFER_INPUT)

const json_str = img.exif.slice(22).toString('utf8')
const json = JSON.parse(json_str)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants