Skip to content

Instantly share code, notes, and snippets.

@LautyDev
Last active June 20, 2024 01:25
Show Gist options
  • Save LautyDev/d864f7a8704fb64f0369610c63ac986f to your computer and use it in GitHub Desktop.
Save LautyDev/d864f7a8704fb64f0369610c63ac986f to your computer and use it in GitHub Desktop.
// Poll example Discord.js V14.15.1
import { PollData, PollLayoutType } from 'discord.js';
const poll: PollData = {
question: {
text: 'PHP is good?',
},
answers: [
{
text: 'Yes',
emoji: '✅',
},
{
text: 'No',
emoji: '❌',
},
],
duration: 2, // 2 hours
allowMultiselect: false,
layoutType: PollLayoutType.Default, // Single type (optional)
};
interaction.reply({
poll: poll,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment