From e5f4cd966acff2c35a0a09e687b4dbb120f3b85f Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Sat, 4 Nov 2023 09:12:06 +1100 Subject: [PATCH] Ping MP Players when the poll is live. --- src/commands/poll.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/poll.ts b/src/commands/poll.ts index 25af69a..a657c1d 100644 --- a/src/commands/poll.ts +++ b/src/commands/poll.ts @@ -13,13 +13,13 @@ export default { const map_names = interaction.options.getString('map_names', true).split('|'); if (map_names.length > 10) return interaction.reply('You can only have up to 10 maps in a poll!'); - const msg = await (interaction.guild.channels.cache.get(channelId) as Discord.TextChannel).send({embeds: [ + const msg = await (interaction.guild.channels.cache.get(channelId) as Discord.TextChannel).send({content: MessageTool.formatMention(client.config.mainServer.roles.mpplayer, 'role'), embeds: [ new client.embed() .setColor(client.config.embedColor) .setTitle('Vote for next map!') .setDescription(map_names.map((map,i)=>`${i+1}. **${map}**`).join('\n')) .setFooter({text: `Poll started by ${interaction.user.tag}`, iconURL: interaction.member.displayAvatarURL({extension: 'webp', size: 1024})}) - ]}); + ], allowedMentions: {parse: ['roles']}}); await interaction.reply(`Successfully created a poll in <#${channelId}>`) const numbers = ['1️⃣','2️⃣','3️⃣','4️⃣','5️⃣','6️⃣','7️⃣','8️⃣','9️⃣','🔟'];