Added discord modals
parent
439323eeb4
commit
f16b53e495
|
@ -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] })
|
||||
},
|
||||
};
|
5
index.js
5
index.js
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue