-1

I have been trying to create a Discord bot using Discord.js and the Google Picker API. I was wondering if there was a way to click on a button in Discord which would directly open up the Google Picker.

Clicking on this button would open up the Picker:

Clicking on this button would open up the Picker

node_modules
  • 4,790
  • 6
  • 21
  • 37
PyroCandy
  • 11
  • 2

1 Answers1

0

Try this guide for Discord Buttons

I leave you an example of how to use the button to which it refers

const { MessageActionRow, MessageButton } = require('discord.js');

//add your code here, and the example as an embed and response message
        const row = new MessageActionRow()
    .addComponents(
        new MessageButton()
        .setURL('your.url.here')
            .setLabel('Google Picker')
            .setStyle('LINK') )
            message.reply({
                content: 'Google Picker?',
                components: [row] //if you want to add more buttons, it would be like this: components: [row, row1, row2, row...]
            })

Richi OV
  • 86
  • 4