hullcss-discord-bot/commands/embeds/paidmember.js

42 lines
1.7 KiB
JavaScript
Raw Normal View History

2022-05-12 00:01:18 +01:00
const discord = require("discord.js");
module.exports = {
2022-05-12 01:03:23 +01:00
name: "paidmember",
2022-05-12 00:01:18 +01:00
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
2022-07-01 18:46:51 +01:00
if(!message.member.permissions.has(Permissions.FLAGS.BAN_MEMBERS, Permissions.FLAGS.ADMINISTRATOR)) return message.channel.send("You don't have permission to use that command.")
const embed = new discord.MessageEmbed()
2022-05-12 00:01:18 +01:00
.setColor('GREEN')
2022-07-01 18:46:51 +01:00
.setFooter({ text: `Called By: ${message.author.tag}`})
2022-05-12 00:01:18 +01:00
.setTimestamp()
.setTitle("Paid Member!")
.setDescription(`Press the button below to get access to the paid member role.`)
2022-05-12 01:19:15 +01:00
.addField('Benefits?', 'Come to every event\r\n Vote in AGMs and EGMs\r\n Access a special area, just for paid members\r\n Access our archive of previous events and guest talks\r\n\r\nAnd support the society you are apart of!')
.addField('Pay for a membership', 'Press the grey button below!')
2022-05-12 00:01:18 +01:00
.setThumbnail('https://i.imgur.com/ww6wKwJ.png')
2022-07-01 18:46:51 +01:00
const row = new discord.MessageActionRow()
2022-05-12 01:19:15 +01:00
.addComponents(
new discord.MessageButton()
.setURL('https://hulluniunion.com/shop?aid=304')
.setEmoji('')
.setLabel('Pay for a membership!')
.setStyle('LINK')
)
2022-07-01 18:46:51 +01:00
.addComponents(
2022-05-12 00:01:18 +01:00
new discord.MessageButton()
2022-05-12 01:03:23 +01:00
.setCustomId('paidModal')
2022-05-12 01:19:15 +01:00
.setLabel('Paid Member Request')
2022-05-12 01:03:23 +01:00
.setStyle('PRIMARY')
2022-05-12 00:01:18 +01:00
)
message.channel.send({ embeds: [embed], components: [row] })
},
};