Skip to content

Is it possible to react to a button from another bot/user? #1091

Closed Answered by lnpotter
lnpotter asked this question in Q&A
Discussion options

You must be logged in to vote

Fixed!

            const emojiRegex = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g
            const matches = embed.description.match(emojiRegex);

            if (matches) {
              for(let match of matches) {
                console.log(`Emojis found: ${match}`)
                if (message.components && message.components.length > 0) {
                  const button = message.components.find((component) => {
                    if (component.type === 'BUTTON') {
                      return component.customId === match;
                    }
                    return false;
                  })

                  if (button) {

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by lnpotter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant