diff --git a/src/main.ts b/src/main.ts index e10b8c1..9b3c5fe 100644 --- a/src/main.ts +++ b/src/main.ts @@ -60,7 +60,7 @@ async function run() { // await importx(__dirname + "/{events,commands}/**/*.{ts,js}"); // The following syntax should be used in the ECMAScript environment - await importx(`${dirname(import.meta.url)}/{events,commands}/**/*.{ts,js}`); + await importx(`${dirname(import.meta.url)}/{events,commands,menus}/**/*.{ts,js}`); // Let's start the bot if (!process.env.DISCORD_TOKEN) { diff --git a/src/menus/report.ts b/src/menus/report.ts new file mode 100644 index 0000000..5148b1f --- /dev/null +++ b/src/menus/report.ts @@ -0,0 +1,14 @@ +import { ApplicationCommandType, MessageContextMenuCommandInteraction } from "discord.js"; +import { ContextMenu, Discord } from "discordx"; + +@Discord() +export class Report { + @ContextMenu({ + name: "Report user", + type: ApplicationCommandType.User, + }) + reportUser(interaction: MessageContextMenuCommandInteraction) { + interaction.reply({content: "Reported user " + interaction.targetId, ephemeral: true}); + } +} +