Adderd button to welcome message
parent
136cf912c5
commit
2adefc9388
|
@ -1,4 +1,4 @@
|
||||||
const { Message, Client, MessageEmbed } = require("discord.js");
|
const discord = require("discord.js");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "welcome",
|
name: "welcome",
|
||||||
|
@ -10,7 +10,7 @@ module.exports = {
|
||||||
* @param {String[]} args
|
* @param {String[]} args
|
||||||
*/
|
*/
|
||||||
run: async (client, message, args) => {
|
run: async (client, message, args) => {
|
||||||
const embed = new MessageEmbed()
|
const embed = new discord.MessageEmbed()
|
||||||
.setColor('GREEN')
|
.setColor('GREEN')
|
||||||
.setFooter(`Called By: ${message.author.tag}`)
|
.setFooter(`Called By: ${message.author.tag}`)
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
|
@ -21,6 +21,15 @@ module.exports = {
|
||||||
.addField('Our Links', `https://hullcss.org/links`)
|
.addField('Our Links', `https://hullcss.org/links`)
|
||||||
.addField('Gain Access', `To gain access to the server, you will need to have a read of the code of conduct, found here: https://github.com/hullcss/conduct/ and react to the check mark below.\r\n \r\n **All Members, including Community are required to read this policy to access the server.**`)
|
.addField('Gain Access', `To gain access to the server, you will need to have a read of the code of conduct, found here: https://github.com/hullcss/conduct/ and react to the check mark below.\r\n \r\n **All Members, including Community are required to read this policy to access the server.**`)
|
||||||
.addField('Confirmation', 'By reacting with the check mark, you confirm that you have read the #hullcss Code of Conduct')
|
.addField('Confirmation', 'By reacting with the check mark, you confirm that you have read the #hullcss Code of Conduct')
|
||||||
message.channel.send({ embeds: [embed] })
|
|
||||||
|
const row = new discord.MessageActionRow()
|
||||||
|
.addComponents(
|
||||||
|
new discord.MessageButton()
|
||||||
|
.setCustomId('codeOfConduct')
|
||||||
|
.setLabel('✅ I have read the code of conduct!')
|
||||||
|
.setStyle('SUCCESS'),
|
||||||
|
);
|
||||||
|
|
||||||
|
message.channel.send({ embeds: [embed], components: [row] })
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
const { glob } = require("glob");
|
const { glob } = require("glob");
|
||||||
const { promisify } = require("util");
|
const { promisify } = require("util");
|
||||||
const { Client } = require("discord.js");
|
const { Client } = require("discord.js");
|
||||||
|
|
||||||
const globPromise = promisify(glob);
|
const globPromise = promisify(glob);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,6 +25,8 @@ module.exports = async (client) => {
|
||||||
const eventFiles = await globPromise(`${process.cwd()}/events/*.js`);
|
const eventFiles = await globPromise(`${process.cwd()}/events/*.js`);
|
||||||
eventFiles.map((value) => require(value));
|
eventFiles.map((value) => require(value));
|
||||||
|
|
||||||
|
// Slash Commands
|
||||||
|
const slashCommands = await globPromise(`${process.cwd()}/SlashCommands/*/*.js`);
|
||||||
const arrayOfSlashCommands = [];
|
const arrayOfSlashCommands = [];
|
||||||
slashCommands.map((value) => {
|
slashCommands.map((value) => {
|
||||||
const file = require(value);
|
const file = require(value);
|
||||||
|
@ -36,10 +39,7 @@ module.exports = async (client) => {
|
||||||
client.on("ready", async () => {
|
client.on("ready", async () => {
|
||||||
// Register for a single guild
|
// Register for a single guild
|
||||||
await client.guilds.cache
|
await client.guilds.cache
|
||||||
.get("744586833135927366")
|
.get("427865794467069962")
|
||||||
.commands.set(arrayOfSlashCommands);
|
.commands.set(arrayOfSlashCommands);
|
||||||
|
|
||||||
// Register for all the guilds the bot is in
|
|
||||||
// await client.application.commands.set(arrayOfSlashCommands);
|
|
||||||
});
|
});
|
||||||
};
|
};
|
Loading…
Reference in New Issue