Create simple inventory list #120
3 changed files with 9 additions and 5 deletions
|
@ -84,11 +84,7 @@ export class CoreClient extends Client {
|
|||
console.log(`Registered Events: ${CoreClient._eventItems.flatMap(x => x.EventType).join(", ")}`);
|
||||
console.log(`Registered Buttons: ${CoreClient._buttonEvents.flatMap(x => x.ButtonId).join(", ")}`);
|
||||
|
||||
const page = await InventoryHelper.GenerateInventoryPage('125776189666230272', 0);
|
||||
|
||||
console.log(page);
|
||||
|
||||
// await super.login(process.env.BOT_TOKEN);
|
||||
await super.login(process.env.BOT_TOKEN);
|
||||
}
|
||||
|
||||
public static RegisterCommand(name: string, command: Command, environment: Environment = Environment.All, serverId?: string) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../type/command";
|
||||
import InventoryHelper from "../helpers/InventoryHelper";
|
||||
|
||||
export default class Inventory extends Command {
|
||||
constructor() {
|
||||
|
@ -11,6 +12,11 @@ export default class Inventory extends Command {
|
|||
}
|
||||
|
||||
public override async execute(interaction: CommandInteraction) {
|
||||
const embed = await InventoryHelper.GenerateInventoryPage(interaction.user.username, interaction.user.id, 0);
|
||||
|
||||
await interaction.reply({
|
||||
embeds: [ embed.embed ],
|
||||
components: [ embed.row ],
|
||||
});
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@ import { CoreClient } from "./client/client";
|
|||
import About from "./commands/about";
|
||||
import Drop from "./commands/drop";
|
||||
import Gdrivesync from "./commands/gdrivesync";
|
||||
import Inventory from "./commands/inventory";
|
||||
import Resync from "./commands/resync";
|
||||
|
||||
// Test Command Imports
|
||||
|
@ -21,6 +22,7 @@ export default class Registry {
|
|||
CoreClient.RegisterCommand('about', new About());
|
||||
CoreClient.RegisterCommand('drop', new Drop());
|
||||
CoreClient.RegisterCommand('gdrivesync', new Gdrivesync());
|
||||
CoreClient.RegisterCommand('inventory', new Inventory());
|
||||
CoreClient.RegisterCommand('resync', new Resync());
|
||||
|
||||
// Test Commands
|
||||
|
|
Loading…
Reference in a new issue