Added Slash Command - RobSoc

imgbot
KieranRobson 2022-06-27 10:53:09 +01:00
parent d889219d29
commit a5b1c05195
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,22 @@
const { Client, CommandInteraction, MessageEmbed } = require("discord.js");
module.exports = {
name: "robsoc",
description: "returns robotics society discord link",
type: 'CHAT_INPUT',
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction, args) => {
const embed = new MessageEmbed()
.setTitle("Robotics Society")
.setColor('BLUE')
.setFooter(`Called By: ${interaction.user.tag}`)
.setDescription('Robotics Society aee a society where you can gain skills in building an actual robot, or get help with your assignments or exams, but they also run social night where they go out to do stuff.')
.addField('You can join them from below!','https://discord.gg/cMP5CavnK4')
interaction.followUp({ embeds: [embed]});
},
};

View File

@ -40,6 +40,10 @@ module.exports = async (client) => {
arrayOfSlashCommands.push(file);
});
client.on("ready", async () => {
const guild = client.guilds.cache.get("969944638498680872");
guild.commands.set([]);
// Register for all the guilds the bot is in
await client.application.commands.set(arrayOfSlashCommands);
});
};