-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from a-linco/a-linco-patch-2
Add files via upload
- Loading branch information
Showing
1 changed file
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}, | ||
}; |