generated from lucxjo/template
Added basic template of report feat.
Signed-off-by: Louis Hollingworth <louis@hollingworth.ch>
This commit is contained in:
parent
c3f77419b1
commit
ae2dbc6c70
|
@ -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) {
|
||||
|
|
14
src/menus/report.ts
Normal file
14
src/menus/report.ts
Normal file
|
@ -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});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue