/[sudobot]/trunk/src/commands/information/LookupCommand.ts
ViewVC logotype

Annotation of /trunk/src/commands/information/LookupCommand.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 344 - (hide annotations)
Mon Jul 29 17:29:40 2024 UTC (8 months, 2 weeks ago) by rakin
File MIME type: application/typescript
File size: 1189 byte(s)
chore: eslint autofix
1 rakin 344 import { CommandInteraction } from "discord.js";
2 rakin 290 import Client from "../../client/Client";
3     import InteractionOptions from "../../types/InteractionOptions";
4     import BaseCommand from "../../utils/structures/BaseCommand";
5    
6     export default class LookupCommand extends BaseCommand {
7     supportsInteractions: boolean = true;
8     supportsLegacy: boolean = false;
9    
10     constructor() {
11     super("lookup", "information", []);
12     }
13    
14     async run(client: Client, interaction: CommandInteraction, options: InteractionOptions): Promise<void> {
15     if (interaction.options.getSubcommand() === "user") {
16     await client.commands.get("userlookup")?.execute(client, interaction, options);
17     }
18     else if (interaction.options.getSubcommand() === "guild") {
19     await client.commands.get("guildlookup")?.execute(client, interaction, options);
20     }
21 rakin 297 else if (interaction.options.getSubcommand() === "avatar") {
22     await client.commands.get("avatarlookup")?.execute(client, interaction, options);
23     }
24 rakin 290 else {
25     await interaction.reply({ content: "Invalid subcommand given. Must be one of 'user' or 'guild'." });
26     }
27     }
28     }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26