This commit is contained in:
parent
f604fd7d18
commit
40db7cfebc
58 changed files with 222 additions and 221 deletions
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "card-drop",
|
||||
"version": "0.8.0",
|
||||
"type": "module",
|
||||
"main": "./dist/bot.js",
|
||||
"typings": "./dist",
|
||||
"scripts": {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { readFileSync } from "fs";
|
||||
import path from "path";
|
||||
import Config from "../database/entities/app/Config";
|
||||
import Config from "../database/entities/app/Config.js";
|
||||
import { glob } from "glob";
|
||||
import { SeriesMetadata } from "../contracts/SeriesMetadata";
|
||||
import { CoreClient } from "../client/client";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import { SeriesMetadata } from "../contracts/SeriesMetadata.js";
|
||||
import { CoreClient } from "../client/client.js";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
|
||||
export interface CardMetadataResult {
|
||||
IsSuccess: boolean;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as dotenv from "dotenv";
|
||||
import { CoreClient } from "./client/client";
|
||||
import { CoreClient } from "./client/client.js";
|
||||
import { IntentsBitField } from "discord.js";
|
||||
import Registry from "./registry";
|
||||
import Registry from "./registry.js";
|
||||
import { existsSync } from "fs";
|
||||
import { ExecException, exec } from "child_process";
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { ButtonInteraction } from "discord.js";
|
||||
import { ButtonEvent } from "../type/buttonEvent";
|
||||
import Inventory from "../database/entities/app/Inventory";
|
||||
import { CoreClient } from "../client/client";
|
||||
import { default as eClaim } from "../database/entities/app/Claim";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import CardDropHelperMetadata from "../helpers/CardDropHelperMetadata";
|
||||
import User from "../database/entities/app/User";
|
||||
import CardConstants from "../constants/CardConstants";
|
||||
import { ButtonEvent } from "../type/buttonEvent.js";
|
||||
import Inventory from "../database/entities/app/Inventory.js";
|
||||
import { CoreClient } from "../client/client.js";
|
||||
import { default as eClaim } from "../database/entities/app/Claim.js";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
import CardDropHelperMetadata from "../helpers/CardDropHelperMetadata.js";
|
||||
import User from "../database/entities/app/User.js";
|
||||
import CardConstants from "../constants/CardConstants.js";
|
||||
|
||||
export default class Claim extends ButtonEvent {
|
||||
public override async execute(interaction: ButtonInteraction) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { ButtonInteraction } from "discord.js";
|
||||
import { ButtonEvent } from "../type/buttonEvent";
|
||||
import InventoryHelper from "../helpers/InventoryHelper";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import { ButtonEvent } from "../type/buttonEvent.js";
|
||||
import InventoryHelper from "../helpers/InventoryHelper.js";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
|
||||
export default class Inventory extends ButtonEvent {
|
||||
public override async execute(interaction: ButtonInteraction) {
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import { AttachmentBuilder, ButtonInteraction } from "discord.js";
|
||||
import { ButtonEvent } from "../type/buttonEvent";
|
||||
import { ButtonEvent } from "../type/buttonEvent.js";
|
||||
import { readFileSync } from "fs";
|
||||
import { v4 } from "uuid";
|
||||
import { CoreClient } from "../client/client";
|
||||
import Inventory from "../database/entities/app/Inventory";
|
||||
import Config from "../database/entities/app/Config";
|
||||
import CardDropHelperMetadata from "../helpers/CardDropHelperMetadata";
|
||||
import { CoreClient } from "../client/client.js";
|
||||
import Inventory from "../database/entities/app/Inventory.js";
|
||||
import Config from "../database/entities/app/Config.js";
|
||||
import CardDropHelperMetadata from "../helpers/CardDropHelperMetadata.js";
|
||||
import path from "path";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import User from "../database/entities/app/User";
|
||||
import CardConstants from "../constants/CardConstants";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
import User from "../database/entities/app/User.js";
|
||||
import CardConstants from "../constants/CardConstants.js";
|
||||
|
||||
export default class Reroll extends ButtonEvent {
|
||||
public override async execute(interaction: ButtonInteraction) {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { ActionRowBuilder, ButtonBuilder, ButtonInteraction, ButtonStyle, EmbedBuilder } from "discord.js";
|
||||
import { ButtonEvent } from "../type/buttonEvent";
|
||||
import Inventory from "../database/entities/app/Inventory";
|
||||
import CardDropHelperMetadata from "../helpers/CardDropHelperMetadata";
|
||||
import { CardRarityToString, GetSacrificeAmount } from "../constants/CardRarity";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import User from "../database/entities/app/User";
|
||||
import { ButtonEvent } from "../type/buttonEvent.js";
|
||||
import Inventory from "../database/entities/app/Inventory.js";
|
||||
import CardDropHelperMetadata from "../helpers/CardDropHelperMetadata.js";
|
||||
import { CardRarityToString, GetSacrificeAmount } from "../constants/CardRarity.js";
|
||||
import EmbedColours from "../constants/EmbedColours.js";
|
||||
import User from "../database/entities/app/User.js";
|
||||
|
||||
export default class Sacrifice extends ButtonEvent {
|
||||
public override async execute(interaction: ButtonInteraction) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { ButtonInteraction } from "discord.js";
|
||||
import { ButtonEvent } from "../type/buttonEvent";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import SeriesHelper from "../helpers/SeriesHelper";
|
||||
import { ButtonEvent } from "../type/buttonEvent.js";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
import SeriesHelper from "../helpers/SeriesHelper.js";
|
||||
|
||||
export default class Series extends ButtonEvent {
|
||||
public override async execute(interaction: ButtonInteraction) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { ActionRowBuilder, ButtonBuilder, ButtonInteraction, ButtonStyle, EmbedBuilder } from "discord.js";
|
||||
import { ButtonEvent } from "../type/buttonEvent";
|
||||
import { CoreClient } from "../client/client";
|
||||
import Inventory from "../database/entities/app/Inventory";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import { ButtonEvent } from "../type/buttonEvent.js";
|
||||
import { CoreClient } from "../client/client.js";
|
||||
import Inventory from "../database/entities/app/Inventory.js";
|
||||
import EmbedColours from "../constants/EmbedColours.js";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
|
||||
export default class Trade extends ButtonEvent {
|
||||
public override async execute(interaction: ButtonInteraction) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {ButtonInteraction} from "discord.js";
|
||||
import {ButtonEvent} from "../type/buttonEvent";
|
||||
import CardSearchHelper from "../helpers/CardSearchHelper";
|
||||
import {ButtonEvent} from "../type/buttonEvent.js";
|
||||
import CardSearchHelper from "../helpers/CardSearchHelper.js";
|
||||
|
||||
export default class View extends ButtonEvent {
|
||||
public override async execute(interaction: ButtonInteraction) {
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
import { Client, DMChannel, Guild, GuildBan, GuildMember, Message, NonThreadGuildBasedChannel, PartialGuildMember, PartialMessage } from "discord.js";
|
||||
import * as dotenv from "dotenv";
|
||||
import ICommandItem from "../contracts/ICommandItem";
|
||||
import EventExecutors from "../contracts/EventExecutors";
|
||||
import { Command } from "../type/command";
|
||||
import ICommandItem from "../contracts/ICommandItem.js";
|
||||
import EventExecutors from "../contracts/EventExecutors.js";
|
||||
import { Command } from "../type/command.js";
|
||||
|
||||
import { Events } from "./events";
|
||||
import { Util } from "./util";
|
||||
import IButtonEventItem from "../contracts/ButtonEventItem";
|
||||
import { ButtonEvent } from "../type/buttonEvent";
|
||||
import AppDataSource from "../database/dataSources/appDataSource";
|
||||
import { Environment } from "../constants/Environment";
|
||||
import Webhooks from "../webhooks";
|
||||
import CardMetadataFunction from "../Functions/CardMetadataFunction";
|
||||
import { SeriesMetadata } from "../contracts/SeriesMetadata";
|
||||
import AppLogger from "./appLogger";
|
||||
import TimerHelper from "../helpers/TimerHelper";
|
||||
import GiveCurrency from "../timers/GiveCurrency";
|
||||
import PurgeClaims from "../timers/PurgeClaims";
|
||||
import { Events } from "./events.js";
|
||||
import { Util } from "./util.js";
|
||||
import IButtonEventItem from "../contracts/ButtonEventItem.js";
|
||||
import { ButtonEvent } from "../type/buttonEvent.js";
|
||||
import AppDataSource from "../database/dataSources/appDataSource.js";
|
||||
import { Environment } from "../constants/Environment.js";
|
||||
import Webhooks from "../webhooks.js";
|
||||
import CardMetadataFunction from "../Functions/CardMetadataFunction.js";
|
||||
import { SeriesMetadata } from "../contracts/SeriesMetadata.js";
|
||||
import AppLogger from "./appLogger.js";
|
||||
import TimerHelper from "../helpers/TimerHelper.js";
|
||||
import GiveCurrency from "../timers/GiveCurrency.js";
|
||||
import PurgeClaims from "../timers/PurgeClaims.js";
|
||||
|
||||
export class CoreClient extends Client {
|
||||
private static _commandItems: ICommandItem[];
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Interaction } from "discord.js";
|
||||
import ChatInputCommand from "./interactionCreate/ChatInputCommand";
|
||||
import Button from "./interactionCreate/Button";
|
||||
import AppLogger from "./appLogger";
|
||||
import NewUserDiscovery from "./interactionCreate/middleware/NewUserDiscovery";
|
||||
import ChatInputCommand from "./interactionCreate/ChatInputCommand.js";
|
||||
import Button from "./interactionCreate/Button.js";
|
||||
import AppLogger from "./appLogger.js";
|
||||
import NewUserDiscovery from "./interactionCreate/middleware/NewUserDiscovery.js";
|
||||
|
||||
export class Events {
|
||||
public async onInteractionCreate(interaction: Interaction) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ButtonInteraction } from "discord.js";
|
||||
import { CoreClient } from "../client";
|
||||
import AppLogger from "../appLogger";
|
||||
import { CoreClient } from "../client.js";
|
||||
import AppLogger from "../appLogger.js";
|
||||
|
||||
export default class Button {
|
||||
public static async onButtonClicked(interaction: ButtonInteraction) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Interaction } from "discord.js";
|
||||
import { CoreClient } from "../client";
|
||||
import ICommandItem from "../../contracts/ICommandItem";
|
||||
import AppLogger from "../appLogger";
|
||||
import { CoreClient } from "../client.js";
|
||||
import ICommandItem from "../../contracts/ICommandItem.js";
|
||||
import AppLogger from "../appLogger.js";
|
||||
|
||||
export default class ChatInputCommand {
|
||||
public static async onChatInput(interaction: Interaction) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Interaction } from "discord.js";
|
||||
import User from "../../../database/entities/app/User";
|
||||
import CardConstants from "../../../constants/CardConstants";
|
||||
import AppLogger from "../../appLogger";
|
||||
import User from "../../../database/entities/app/User.js";
|
||||
import CardConstants from "../../../constants/CardConstants.js";
|
||||
import AppLogger from "../../appLogger.js";
|
||||
|
||||
export default async function NewUserDiscovery(interaction: Interaction) {
|
||||
const existingUser = await User.FetchOneById(User, interaction.user.id);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Client, REST, Routes, SlashCommandBuilder } from "discord.js";
|
||||
import EventExecutors from "../contracts/EventExecutors";
|
||||
import { CoreClient } from "./client";
|
||||
import AppLogger from "./appLogger";
|
||||
import EventExecutors from "../contracts/EventExecutors.js";
|
||||
import { CoreClient } from "./client.js";
|
||||
import AppLogger from "./appLogger.js";
|
||||
|
||||
export class Util {
|
||||
public loadSlashCommands(client: Client) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, CommandInteraction, EmbedBuilder, SlashCommandBuilder } from "discord.js";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import { Command } from "../type/command";
|
||||
import EmbedColours from "../constants/EmbedColours.js";
|
||||
import { Command } from "../type/command.js";
|
||||
|
||||
export default class About extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { CommandInteraction, EmbedBuilder, PermissionsBitField, SlashCommandBuilder } from "discord.js";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import { Command } from "../type/command";
|
||||
import User from "../database/entities/app/User";
|
||||
import EmbedColours from "../constants/EmbedColours.js";
|
||||
import { Command } from "../type/command.js";
|
||||
import User from "../database/entities/app/User.js";
|
||||
|
||||
export default class AllBalance extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { CommandInteraction, EmbedBuilder, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../type/command";
|
||||
import User from "../database/entities/app/User";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import { Command } from "../type/command.js";
|
||||
import User from "../database/entities/app/User.js";
|
||||
import EmbedColours from "../constants/EmbedColours.js";
|
||||
|
||||
export default class Balance extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../type/command";
|
||||
import User from "../database/entities/app/User";
|
||||
import CardConstants from "../constants/CardConstants";
|
||||
import TimeLengthInput from "../helpers/TimeLengthInput";
|
||||
import { Command } from "../type/command.js";
|
||||
import User from "../database/entities/app/User.js";
|
||||
import CardConstants from "../constants/CardConstants.js";
|
||||
import TimeLengthInput from "../helpers/TimeLengthInput.js";
|
||||
|
||||
export default class Daily extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import { AttachmentBuilder, CommandInteraction, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../type/command";
|
||||
import { Command } from "../type/command.js";
|
||||
import { readFileSync } from "fs";
|
||||
import { CoreClient } from "../client/client";
|
||||
import { CoreClient } from "../client/client.js";
|
||||
import { v4 } from "uuid";
|
||||
import Inventory from "../database/entities/app/Inventory";
|
||||
import Config from "../database/entities/app/Config";
|
||||
import CardDropHelperMetadata from "../helpers/CardDropHelperMetadata";
|
||||
import Inventory from "../database/entities/app/Inventory.js";
|
||||
import Config from "../database/entities/app/Config.js";
|
||||
import CardDropHelperMetadata from "../helpers/CardDropHelperMetadata.js";
|
||||
import path from "path";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import User from "../database/entities/app/User";
|
||||
import CardConstants from "../constants/CardConstants";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
import User from "../database/entities/app/User.js";
|
||||
import CardConstants from "../constants/CardConstants.js";
|
||||
|
||||
export default class Drop extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { CacheType, CommandInteraction, PermissionsBitField, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../type/command";
|
||||
import { Command } from "../type/command.js";
|
||||
import { ExecException, exec } from "child_process";
|
||||
import { CoreClient } from "../client/client";
|
||||
import Config from "../database/entities/app/Config";
|
||||
import CardMetadataFunction from "../Functions/CardMetadataFunction";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import { CoreClient } from "../client/client.js";
|
||||
import Config from "../database/entities/app/Config.js";
|
||||
import CardMetadataFunction from "../Functions/CardMetadataFunction.js";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
|
||||
export default class Gdrivesync extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { CacheType, CommandInteraction, PermissionsBitField, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../type/command";
|
||||
import { CoreClient } from "../client/client";
|
||||
import Config from "../database/entities/app/Config";
|
||||
import CardDropHelperMetadata from "../helpers/CardDropHelperMetadata";
|
||||
import Inventory from "../database/entities/app/Inventory";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import User from "../database/entities/app/User";
|
||||
import { Command } from "../type/command.js";
|
||||
import { CoreClient } from "../client/client.js";
|
||||
import Config from "../database/entities/app/Config.js";
|
||||
import CardDropHelperMetadata from "../helpers/CardDropHelperMetadata.js";
|
||||
import Inventory from "../database/entities/app/Inventory.js";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
import User from "../database/entities/app/User.js";
|
||||
|
||||
export default class Give extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../type/command";
|
||||
import InventoryHelper from "../helpers/InventoryHelper";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import { Command } from "../type/command.js";
|
||||
import InventoryHelper from "../helpers/InventoryHelper.js";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
|
||||
export default class Inventory extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { CacheType, CommandInteraction, PermissionsBitField, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../type/command";
|
||||
import Config from "../database/entities/app/Config";
|
||||
import CardMetadataFunction from "../Functions/CardMetadataFunction";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import { Command } from "../type/command.js";
|
||||
import Config from "../database/entities/app/Config.js";
|
||||
import CardMetadataFunction from "../Functions/CardMetadataFunction.js";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
|
||||
export default class Resync extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, CacheType, CommandInteraction, EmbedBuilder, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../type/command";
|
||||
import Inventory from "../database/entities/app/Inventory";
|
||||
import { CardRarityToString, GetSacrificeAmount } from "../constants/CardRarity";
|
||||
import CardDropHelperMetadata from "../helpers/CardDropHelperMetadata";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import { Command } from "../type/command.js";
|
||||
import Inventory from "../database/entities/app/Inventory.js";
|
||||
import { CardRarityToString, GetSacrificeAmount } from "../constants/CardRarity.js";
|
||||
import CardDropHelperMetadata from "../helpers/CardDropHelperMetadata.js";
|
||||
import EmbedColours from "../constants/EmbedColours.js";
|
||||
|
||||
export default class Sacrifice extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../type/command";
|
||||
import { CoreClient } from "../client/client";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import SeriesHelper from "../helpers/SeriesHelper";
|
||||
import { Command } from "../type/command.js";
|
||||
import { CoreClient } from "../client/client.js";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
import SeriesHelper from "../helpers/SeriesHelper.js";
|
||||
|
||||
export default class Series extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { AttachmentBuilder, CacheType, CommandInteraction, DiscordAPIError, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../../type/command";
|
||||
import { Command } from "../../type/command.js";
|
||||
import { readFileSync } from "fs";
|
||||
import Inventory from "../../database/entities/app/Inventory";
|
||||
import Inventory from "../../database/entities/app/Inventory.js";
|
||||
import { v4 } from "uuid";
|
||||
import { CoreClient } from "../../client/client";
|
||||
import { CoreClient } from "../../client/client.js";
|
||||
import path from "path";
|
||||
import CardDropHelperMetadata from "../../helpers/CardDropHelperMetadata";
|
||||
import CardDropHelperMetadata from "../../helpers/CardDropHelperMetadata.js";
|
||||
|
||||
export default class Dropnumber extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { AttachmentBuilder, CacheType, CommandInteraction, DiscordAPIError, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../../type/command";
|
||||
import { CardRarity, CardRarityParse } from "../../constants/CardRarity";
|
||||
import { Command } from "../../type/command.js";
|
||||
import { CardRarity, CardRarityParse } from "../../constants/CardRarity.js";
|
||||
import { readFileSync } from "fs";
|
||||
import Inventory from "../../database/entities/app/Inventory";
|
||||
import Inventory from "../../database/entities/app/Inventory.js";
|
||||
import { v4 } from "uuid";
|
||||
import { CoreClient } from "../../client/client";
|
||||
import CardDropHelperMetadata from "../../helpers/CardDropHelperMetadata";
|
||||
import { CoreClient } from "../../client/client.js";
|
||||
import CardDropHelperMetadata from "../../helpers/CardDropHelperMetadata.js";
|
||||
import path from "path";
|
||||
|
||||
export default class Droprarity extends Command {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, CommandInteraction, EmbedBuilder, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../type/command";
|
||||
import Inventory from "../database/entities/app/Inventory";
|
||||
import { CoreClient } from "../client/client";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import { Command } from "../type/command.js";
|
||||
import Inventory from "../database/entities/app/Inventory.js";
|
||||
import { CoreClient } from "../client/client.js";
|
||||
import EmbedColours from "../constants/EmbedColours.js";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
|
||||
export default class Trade extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { AttachmentBuilder, CommandInteraction, DiscordAPIError, SlashCommandBuilder } from "discord.js";
|
||||
import { Command } from "../type/command";
|
||||
import { CoreClient } from "../client/client";
|
||||
import { Command } from "../type/command.js";
|
||||
import { CoreClient } from "../client/client.js";
|
||||
import { readFileSync } from "fs";
|
||||
import path from "path";
|
||||
import Inventory from "../database/entities/app/Inventory";
|
||||
import CardDropHelperMetadata from "../helpers/CardDropHelperMetadata";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import CardSearchHelper from "../helpers/CardSearchHelper";
|
||||
import Inventory from "../database/entities/app/Inventory.js";
|
||||
import CardDropHelperMetadata from "../helpers/CardDropHelperMetadata.js";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
import CardSearchHelper from "../helpers/CardSearchHelper.js";
|
||||
|
||||
export default class View extends Command {
|
||||
constructor() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import EmbedColours from "./EmbedColours";
|
||||
import EmbedColours from "./EmbedColours.js";
|
||||
|
||||
export enum CardRarity {
|
||||
Unknown,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Column, DeepPartial, EntityTarget, PrimaryColumn, ObjectLiteral, FindOptionsWhere } from "typeorm";
|
||||
import { v4 } from "uuid";
|
||||
import AppDataSource from "../database/dataSources/appDataSource";
|
||||
import AppDataSource from "../database/dataSources/appDataSource.js";
|
||||
|
||||
export default class AppBaseEntity {
|
||||
constructor() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Environment } from "../constants/Environment";
|
||||
import { ButtonEvent } from "../type/buttonEvent";
|
||||
import { Environment } from "../constants/Environment.js";
|
||||
import { ButtonEvent } from "../type/buttonEvent.js";
|
||||
|
||||
interface ButtonEventItem {
|
||||
ButtonId: string,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Environment } from "../constants/Environment";
|
||||
import { Command } from "../type/command";
|
||||
import { Environment } from "../constants/Environment.js";
|
||||
import { Command } from "../type/command.js";
|
||||
|
||||
interface ICommandItem {
|
||||
Name: string,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { CardRarity } from "../constants/CardRarity";
|
||||
import { CardRarity } from "../constants/CardRarity.js";
|
||||
|
||||
export interface SeriesMetadata {
|
||||
id: number,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Column, Entity, ManyToOne } from "typeorm";
|
||||
import AppBaseEntity from "../../../contracts/AppBaseEntity";
|
||||
import Inventory from "./Inventory";
|
||||
import AppDataSource from "../../dataSources/appDataSource";
|
||||
import AppBaseEntity from "../../../contracts/AppBaseEntity.js";
|
||||
import Inventory from "./Inventory.js";
|
||||
import AppDataSource from "../../dataSources/appDataSource.js";
|
||||
|
||||
@Entity()
|
||||
export default class Claim extends AppBaseEntity {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Column, Entity } from "typeorm";
|
||||
import AppBaseEntity from "../../../contracts/AppBaseEntity";
|
||||
import AppDataSource from "../../dataSources/appDataSource";
|
||||
import AppBaseEntity from "../../../contracts/AppBaseEntity.js";
|
||||
import AppDataSource from "../../dataSources/appDataSource.js";
|
||||
|
||||
@Entity()
|
||||
export default class Config extends AppBaseEntity {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Column, Entity, OneToMany } from "typeorm";
|
||||
import AppBaseEntity from "../../../contracts/AppBaseEntity";
|
||||
import AppDataSource from "../../dataSources/appDataSource";
|
||||
import Claim from "./Claim";
|
||||
import AppBaseEntity from "../../../contracts/AppBaseEntity.js";
|
||||
import AppDataSource from "../../dataSources/appDataSource.js";
|
||||
import Claim from "./Claim.js";
|
||||
|
||||
@Entity()
|
||||
export default class Inventory extends AppBaseEntity {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Column, Entity } from "typeorm";
|
||||
import AppBaseEntity from "../../../contracts/AppBaseEntity";
|
||||
import AppBaseEntity from "../../../contracts/AppBaseEntity.js";
|
||||
|
||||
@Entity()
|
||||
export default class User extends AppBaseEntity {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
import MigrationHelper from "../../../../helpers/MigrationHelper";
|
||||
import MigrationHelper from "../../../../helpers/MigrationHelper.js";
|
||||
|
||||
export class CreateClaim1694609771821 implements MigrationInterface {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
import MigrationHelper from "../../../../helpers/MigrationHelper";
|
||||
import MigrationHelper from "../../../../helpers/MigrationHelper.js";
|
||||
|
||||
export class CreateBase1693769942868 implements MigrationInterface {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
import MigrationHelper from "../../../../helpers/MigrationHelper";
|
||||
import MigrationHelper from "../../../../helpers/MigrationHelper.js";
|
||||
|
||||
export class CreateConfig1699814500650 implements MigrationInterface {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
import MigrationHelper from "../../../../helpers/MigrationHelper";
|
||||
import MigrationHelper from "../../../../helpers/MigrationHelper.js";
|
||||
|
||||
export class User1713289062969 implements MigrationInterface {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
import MigrationHelper from "../../../../helpers/MigrationHelper";
|
||||
import MigrationHelper from "../../../../helpers/MigrationHelper.js";
|
||||
|
||||
export class Daily1715967355818 implements MigrationInterface {
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder } from "discord.js";
|
||||
import { CardRarity, CardRarityToColour, CardRarityToString } from "../constants/CardRarity";
|
||||
import CardRarityChances from "../constants/CardRarityChances";
|
||||
import { DropResult } from "../contracts/SeriesMetadata";
|
||||
import { CoreClient } from "../client/client";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import CardConstants from "../constants/CardConstants";
|
||||
import { CardRarity, CardRarityToColour, CardRarityToString } from "../constants/CardRarity.js";
|
||||
import CardRarityChances from "../constants/CardRarityChances.js";
|
||||
import { DropResult } from "../contracts/SeriesMetadata.js";
|
||||
import { CoreClient } from "../client/client.js";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
import CardConstants from "../constants/CardConstants.js";
|
||||
|
||||
export default class CardDropHelperMetadata {
|
||||
public static GetRandomCard(): DropResult | undefined {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import {ActionRowBuilder, AttachmentBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder} from "discord.js";
|
||||
import {Fzf} from "fzf";
|
||||
import {CoreClient} from "../client/client";
|
||||
import CardDropHelperMetadata from "./CardDropHelperMetadata";
|
||||
import Inventory from "../database/entities/app/Inventory";
|
||||
import {CoreClient} from "../client/client.js";
|
||||
import CardDropHelperMetadata from "./CardDropHelperMetadata.js";
|
||||
import Inventory from "../database/entities/app/Inventory.js";
|
||||
import {readFileSync} from "fs";
|
||||
import path from "path";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
|
||||
interface ReturnedPage {
|
||||
embed: EmbedBuilder,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import {createCanvas, loadImage} from "canvas";
|
||||
import path from "path";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
import {existsSync} from "fs";
|
||||
import Inventory from "../database/entities/app/Inventory";
|
||||
import Inventory from "../database/entities/app/Inventory.js";
|
||||
import Jimp from "jimp";
|
||||
|
||||
interface CardInput {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { ActionRowBuilder, AttachmentBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder } from "discord.js";
|
||||
import Inventory from "../database/entities/app/Inventory";
|
||||
import { CoreClient } from "../client/client";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import { CardRarity, CardRarityToString } from "../constants/CardRarity";
|
||||
import Inventory from "../database/entities/app/Inventory.js";
|
||||
import { CoreClient } from "../client/client.js";
|
||||
import EmbedColours from "../constants/EmbedColours.js";
|
||||
import { CardRarity, CardRarityToString } from "../constants/CardRarity.js";
|
||||
import cloneDeep from "clone-deep";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import ImageHelper from "./ImageHelper";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
import ImageHelper from "./ImageHelper.js";
|
||||
|
||||
interface InventoryPage {
|
||||
id: number,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { ActionRowBuilder, AttachmentBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder } from "discord.js";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
import cloneDeep from "clone-deep";
|
||||
import { CoreClient } from "../client/client";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import { CardRarityToString } from "../constants/CardRarity";
|
||||
import ImageHelper from "./ImageHelper";
|
||||
import { CoreClient } from "../client/client.js";
|
||||
import EmbedColours from "../constants/EmbedColours.js";
|
||||
import { CardRarityToString } from "../constants/CardRarity.js";
|
||||
import ImageHelper from "./ImageHelper.js";
|
||||
|
||||
export default class SeriesHelper {
|
||||
public static async GenerateSeriesViewPage(seriesId: number, page: number, userId: string): Promise<{ embed: EmbedBuilder, row: ActionRowBuilder<ButtonBuilder>, image: AttachmentBuilder } | null> {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import StringTools from "./StringTools";
|
||||
import StringTools from "./StringTools.js";
|
||||
|
||||
export default class TimeLengthInput {
|
||||
public readonly value: string;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { CronJob } from "cron";
|
||||
import { v4 } from "uuid";
|
||||
import { Primitive } from "../type/primitive";
|
||||
import { Primitive } from "../type/primitive.js";
|
||||
|
||||
interface Timer {
|
||||
id: string;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Request, Response } from "express";
|
||||
import CardMetadataFunction from "../Functions/CardMetadataFunction";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import CardMetadataFunction from "../Functions/CardMetadataFunction.js";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
|
||||
export default async function ReloadDB(req: Request, res: Response) {
|
||||
AppLogger.LogInfo("Hooks/ReloadDB", "Reloading Card DB...");
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
import { CoreClient } from "./client/client";
|
||||
import { Environment } from "./constants/Environment";
|
||||
import { CoreClient } from "./client/client.js";
|
||||
import { Environment } from "./constants/Environment.js";
|
||||
|
||||
// Global Command Imports
|
||||
import About from "./commands/about";
|
||||
import AllBalance from "./commands/allbalance";
|
||||
import Balance from "./commands/balance";
|
||||
import Daily from "./commands/daily";
|
||||
import Drop from "./commands/drop";
|
||||
import Gdrivesync from "./commands/gdrivesync";
|
||||
import Give from "./commands/give";
|
||||
import Inventory from "./commands/inventory";
|
||||
import Resync from "./commands/resync";
|
||||
import Sacrifice from "./commands/sacrifice";
|
||||
import Series from "./commands/series";
|
||||
import Trade from "./commands/trade";
|
||||
import View from "./commands/view";
|
||||
import About from "./commands/about.js";
|
||||
import AllBalance from "./commands/allbalance.js";
|
||||
import Balance from "./commands/balance.js";
|
||||
import Daily from "./commands/daily.js";
|
||||
import Drop from "./commands/drop.js";
|
||||
import Gdrivesync from "./commands/gdrivesync.js";
|
||||
import Give from "./commands/give.js";
|
||||
import Inventory from "./commands/inventory.js";
|
||||
import Resync from "./commands/resync.js";
|
||||
import Sacrifice from "./commands/sacrifice.js";
|
||||
import Series from "./commands/series.js";
|
||||
import Trade from "./commands/trade.js";
|
||||
import View from "./commands/view.js";
|
||||
|
||||
// Test Command Imports
|
||||
import Dropnumber from "./commands/stage/dropnumber";
|
||||
import Droprarity from "./commands/stage/droprarity";
|
||||
import Dropnumber from "./commands/stage/dropnumber.js";
|
||||
import Droprarity from "./commands/stage/droprarity.js";
|
||||
|
||||
// Button Event Imports
|
||||
import Claim from "./buttonEvents/Claim";
|
||||
import InventoryButtonEvent from "./buttonEvents/Inventory";
|
||||
import Reroll from "./buttonEvents/Reroll";
|
||||
import SacrificeButtonEvent from "./buttonEvents/Sacrifice";
|
||||
import SeriesEvent from "./buttonEvents/Series";
|
||||
import TradeButtonEvent from "./buttonEvents/Trade";
|
||||
import ViewButtonEvent from "./buttonEvents/View";
|
||||
import Claim from "./buttonEvents/Claim.js";
|
||||
import InventoryButtonEvent from "./buttonEvents/Inventory.js";
|
||||
import Reroll from "./buttonEvents/Reroll.js";
|
||||
import SacrificeButtonEvent from "./buttonEvents/Sacrifice.js";
|
||||
import SeriesEvent from "./buttonEvents/Series.js";
|
||||
import TradeButtonEvent from "./buttonEvents/Trade.js";
|
||||
import ViewButtonEvent from "./buttonEvents/View.js";
|
||||
|
||||
export default class Registry {
|
||||
public static RegisterCommands() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import AppLogger from "../client/appLogger";
|
||||
import CardConstants from "../constants/CardConstants";
|
||||
import User from "../database/entities/app/User";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
import CardConstants from "../constants/CardConstants.js";
|
||||
import User from "../database/entities/app/User.js";
|
||||
|
||||
export default async function GiveCurrency() {
|
||||
AppLogger.LogDebug("Timers/GiveCurrency", "Giving currency to every known user");
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import AppLogger from "../client/appLogger";
|
||||
import Claim from "../database/entities/app/Claim";
|
||||
import AppLogger from "../client/appLogger.js";
|
||||
import Claim from "../database/entities/app/Claim.js";
|
||||
|
||||
export default async function PurgeClaims() {
|
||||
const claims = await Claim.FetchAll(Claim);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import bodyParser from "body-parser";
|
||||
import express, { Application } from "express";
|
||||
import ReloadDB from "./hooks/ReloadDB";
|
||||
import AppLogger from "./client/appLogger";
|
||||
import ReloadDB from "./hooks/ReloadDB.js";
|
||||
import AppLogger from "./client/appLogger.js";
|
||||
|
||||
export default class Webhooks {
|
||||
private app: Application;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/* Basic Options */
|
||||
// "incremental": true, /* Enable incremental compilation */
|
||||
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */
|
||||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
||||
"module": "es2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
||||
// "lib": [], /* Specify library files to be included in the compilation. */
|
||||
// "allowJs": true, /* Allow javascript files to be compiled. */
|
||||
// "checkJs": true, /* Report errors in .js files. */
|
||||
|
@ -44,7 +44,7 @@
|
|||
// "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
|
||||
|
||||
/* Module Resolution Options */
|
||||
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
||||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
||||
|
|
Loading…
Reference in a new issue