Added discord modals

imgbot
kieranrobson 2022-05-12 00:01:18 +01:00
parent 439323eeb4
commit f16b53e495
2 changed files with 35 additions and 3 deletions

View File

@ -0,0 +1,33 @@
const discord = require("discord.js");
const { Modal } = require('discord-modals') // Modal class
module.exports = {
name: "welcome",
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
const embed = new discord.MessageEmbed()
.setColor('GREEN')
.setFooter(`Called By: ${message.author.tag}`)
.setTimestamp()
.setTitle("Paid Member!")
.setDescription(`Press the button below to get access to the paid member role.`)
.setThumbnail('https://i.imgur.com/ww6wKwJ.png')
const row = new discord.MessageActionRow()
.addComponents(
new discord.MessageButton()
.setURL('https://github.com/hullcss/conduct/')
.setEmoji('')
.setLabel('Code of Conduct')
.setStyle('LINK')
)
message.channel.send({ embeds: [embed], components: [row] })
},
};

View File

@ -1,8 +1,6 @@
const config = require("./config.json");
const { Client, Collection } = require("discord.js");
const discordModals = require('discord-modals')
const client = new Client({
intents: 32767,
});
@ -11,6 +9,7 @@ module.exports = client;
// Global Variables
client.commands = new Collection();
client.slashCommands = new Collection();
discordModals(client);
//client.config = require("./config.json");
// Initializing the project