diff --git a/SlashCommands/general/robsoc.js b/SlashCommands/general/robsoc.js new file mode 100644 index 0000000..0b2dae7 --- /dev/null +++ b/SlashCommands/general/robsoc.js @@ -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]}); + }, +}; \ No newline at end of file diff --git a/handler/index.js b/handler/index.js index 1a37cf1..7bca2f6 100644 --- a/handler/index.js +++ b/handler/index.js @@ -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); }); };