1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 08:20:58 -05:00

Ping MP Players when the poll is live.

This commit is contained in:
AnxietyisReal 2023-11-04 09:12:06 +11:00
parent a6ed435306
commit e5f4cd966a

View File

@ -13,13 +13,13 @@ export default {
const map_names = interaction.options.getString('map_names', true).split('|'); 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!'); 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() new client.embed()
.setColor(client.config.embedColor) .setColor(client.config.embedColor)
.setTitle('Vote for next map!') .setTitle('Vote for next map!')
.setDescription(map_names.map((map,i)=>`${i+1}. **${map}**`).join('\n')) .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})}) .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}>`) await interaction.reply(`Successfully created a poll in <#${channelId}>`)
const numbers = ['1⃣','2⃣','3⃣','4⃣','5⃣','6⃣','7⃣','8⃣','9⃣','🔟']; const numbers = ['1⃣','2⃣','3⃣','4⃣','5⃣','6⃣','7⃣','8⃣','9⃣','🔟'];