Skip to content

Commit

Permalink
Merge pull request #2 from a-linco/a-linco-patch-2
Browse files Browse the repository at this point in the history
Add files via upload
  • Loading branch information
a-linco authored Feb 23, 2023
2 parents f54f169 + 39335ad commit 9cd1d81
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions lib/discord/commands/unregister.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
const { SlashCommandBuilder } = require("discord.js");
const { UnregisterUserService } = require("../../services");

class UnregisterCommand {
async execute(interaction) {
const unregisterUserService = new UnregisterUserService();
const data = await unregisterUserService.execute(interaction.user.id);
interaction.reply(data.message);
}
}

module.exports = {
data: new SlashCommandBuilder().setName("unregister").setDescription("..."),
async execute(interaction) {
const unregisterCommand = new UnregisterCommand();
await unregisterCommand.execute(interaction);
},
};
const { SlashCommandBuilder } = require("discord.js");
const { UnregisterUserService } = require("../../services");

class UnregisterCommand {
async execute(interaction) {
const unregisterUserService = new UnregisterUserService();
const data = await unregisterUserService.execute(interaction.user.id);
interaction.reply(data.message);
}
}

module.exports = {
data: new SlashCommandBuilder().setName("unregister").setDescription("Unregister from a course."),
async execute(interaction) {
const unregisterCommand = new UnregisterCommand();
await unregisterCommand.execute(interaction);
},
};

0 comments on commit 9cd1d81

Please sign in to comment.