This commit is contained in:
parent
8527c0a870
commit
b741ac154c
3 changed files with 8 additions and 7 deletions
|
@ -42,7 +42,7 @@ export default class Claim extends ButtonEvent {
|
||||||
|
|
||||||
await inventory.Save(Inventory, inventory);
|
await inventory.Save(Inventory, inventory);
|
||||||
|
|
||||||
let user = await User.FetchOneById(User, userId) || new User(userId, 300);
|
const user = await User.FetchOneById(User, userId) || new User(userId, 300);
|
||||||
|
|
||||||
AppLogger.LogSilly("Button/Claim", `${user.Id} has ${user.Currency} currency`);
|
AppLogger.LogSilly("Button/Claim", `${user.Id} has ${user.Currency} currency`);
|
||||||
|
|
||||||
|
|
|
@ -56,12 +56,12 @@ export default class Give extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (interaction.options.getSubcommand()) {
|
switch (interaction.options.getSubcommand()) {
|
||||||
case "card":
|
case "card":
|
||||||
await this.GiveCard(interaction);
|
await this.GiveCard(interaction);
|
||||||
break;
|
break;
|
||||||
case "currency":
|
case "currency":
|
||||||
await this.GiveCurrency(interaction);
|
await this.GiveCurrency(interaction);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { CommandInteraction } from "discord.js";
|
import { CommandInteraction } from "discord.js";
|
||||||
|
|
||||||
export abstract class Command {
|
export abstract class Command {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- CommandBuilder type is dynamic depending on options and can't be strictly typed
|
||||||
public CommandBuilder: any;
|
public CommandBuilder: any;
|
||||||
|
|
||||||
abstract execute(interaction: CommandInteraction): Promise<void>;
|
abstract execute(interaction: CommandInteraction): Promise<void>;
|
||||||
|
|
Loading…
Reference in a new issue