Compare commits
No commits in common. "7b620dfd90c2439833e785cd572b24fa642c4981" and "2b356295060c1dc48ce1b48a017b4a2542624704" have entirely different histories.
7b620dfd90
...
2b35629506
7 changed files with 3 additions and 89 deletions
|
@ -7,7 +7,7 @@
|
|||
# any secret values.
|
||||
|
||||
BOT_TOKEN=
|
||||
BOT_VER=3.3.0
|
||||
BOT_VER=3.2.1
|
||||
BOT_AUTHOR=Vylpes
|
||||
BOT_OWNERID=147392775707426816
|
||||
BOT_CLIENTID=682942374040961060
|
||||
|
@ -24,5 +24,3 @@ DB_AUTH_USER=dev
|
|||
DB_AUTH_PASS=dev
|
||||
DB_SYNC=true
|
||||
DB_LOGGING=true
|
||||
DB_ROOT_HOST=0.0.0.0
|
||||
DB_DATA_LOCATION=./.temp/database
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -106,4 +106,3 @@ dist
|
|||
config.json
|
||||
.DS_Store
|
||||
ormconfig.json
|
||||
.temp/
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
CREATE TABLE `moon` (
|
||||
`Id` varchar(255) NOT NULL,
|
||||
`WhenCreated` datetime NOT NULL,
|
||||
`WhenUpdated` datetime NOT NULL,
|
||||
`ServerId` varchar(255) NOT NULL,
|
||||
`UserId` varchar(255) NOT NULL,
|
||||
`Description` varchar(255) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
import { Command } from "../../type/command";
|
||||
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
|
||||
import ListMoons from "./moons/list";
|
||||
|
||||
export default class Moons extends Command {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.CommandBuilder = new SlashCommandBuilder()
|
||||
.setName("moons")
|
||||
.setDescription("View and create moons")
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand
|
||||
.setName('list')
|
||||
.setDescription('List moons you have obtained'));
|
||||
}
|
||||
|
||||
public override async execute(interaction: CommandInteraction) {
|
||||
if (!interaction.isChatInputCommand()) return;
|
||||
|
||||
switch (interaction.options.getSubcommand()) {
|
||||
case "list":
|
||||
await ListMoons(interaction);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
import {CommandInteraction} from "discord.js";
|
||||
|
||||
export default async function ListMoons(interaction: CommandInteraction) {
|
||||
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
import { Column, Entity } from "typeorm";
|
||||
import BaseEntity from "../../contracts/BaseEntity";
|
||||
import AppDataSource from "../dataSources/appDataSource";
|
||||
|
||||
@Entity()
|
||||
export default class Moon extends BaseEntity {
|
||||
constructor(description: string, userId: string) {
|
||||
super();
|
||||
|
||||
this.Description = description;
|
||||
this.UserId = userId;
|
||||
}
|
||||
|
||||
@Column()
|
||||
Description: string;
|
||||
|
||||
@Column()
|
||||
UserId: string;
|
||||
|
||||
public static async FetchMoonsByUserId(userId: string): Promise<Moon[] | null> {
|
||||
const repository = AppDataSource.getRepository(Moon);
|
||||
|
||||
const all = await repository.find({ where: { UserId: userId } });
|
||||
|
||||
return all;
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm"
|
||||
import MigrationHelper from "../../../helpers/MigrationHelper"
|
||||
|
||||
export class CreateMoon1719856023429 implements MigrationInterface {
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
MigrationHelper.Up('1719856023429-CreateMoon', '3.3.0', [
|
||||
"01-Moon",
|
||||
], queryRunner);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue