Fix build

This commit is contained in:
Ethan Lane 2024-06-03 18:42:01 +01:00
parent a581bf9d80
commit fd16500315
3 changed files with 8 additions and 6 deletions

View file

@ -77,7 +77,7 @@ export default class Give extends Command {
}
const cardNumber = interaction.options.get("cardnumber", true);
const user = interaction.options.getUser("user", true);
const user = interaction.options.get("user", true).user!;
AppLogger.LogSilly("Commands/Give/GiveCard", `Parameters: cardNumber=${cardNumber.value}, user=${user.id}`);
@ -103,7 +103,7 @@ export default class Give extends Command {
private async GiveCurrency(interaction: CommandInteraction) {
const amount = interaction.options.get("amount", true);
const user = interaction.options.getUser("user", true);
const user = interaction.options.get("user", true).user!;
AppLogger.LogSilly("Commands/Give/GiveCurrency", `Parameters: amount=${amount.value} user=${user.id}`);

View file

@ -22,7 +22,9 @@ export default class Inventory extends Command {
public override async execute(interaction: CommandInteraction) {
const page = interaction.options.get("page");
const user = interaction.options.getUser("user") || interaction.user;
const userOption = interaction.options.get("user");
const user = userOption ? userOption.user! : interaction.user;
AppLogger.LogSilly("Commands/Inventory", `Parameters: page=${page?.value}, user=${user.id}`);

View file

@ -30,9 +30,9 @@ export default class Trade extends Command {
}
public override async execute(interaction: CommandInteraction) {
const user = interaction.options.getUser("user")!;
const give = interaction.options.get("give")!;
const receive = interaction.options.get("receive")!;
const user = interaction.options.get("user", true).user!;
const give = interaction.options.get("give", true);
const receive = interaction.options.get("receive", true);
AppLogger.LogSilly("Commands/Trade", `Parameters: user=${user.id}, give=${give.value}, receive=${receive.value}`);