Adds eslint and linted & improved routing for interactions
This commit is contained in:
parent
83209f642c
commit
441715675c
35 changed files with 2091 additions and 463 deletions
|
|
@ -1,22 +1,16 @@
|
|||
import {
|
||||
SlashCommandBuilder,
|
||||
Interaction,
|
||||
CommandInteraction,
|
||||
AutocompleteInteraction,
|
||||
GuildMember,
|
||||
EmbedBuilder, MessageFlags, ChatInputCommandInteraction, ModalSubmitFields, time, User
|
||||
EmbedBuilder, MessageFlags, ChatInputCommandInteraction, time
|
||||
} from "discord.js";
|
||||
import {AutocompleteCommand, ChatInteractionCommand, Command} from "./Command";
|
||||
import {Container} from "../../Container/Container";
|
||||
import {GroupRepository} from "../../Repositories/GroupRepository";
|
||||
import {GroupSelection} from "../CommandPartials/GroupSelection";
|
||||
import {setFlagsFromString} from "node:v8";
|
||||
import {UserError} from "../UserError";
|
||||
import Playdate from "../../Database/tables/Playdate";
|
||||
import {PlaydateModel} from "../../Models/PlaydateModel";
|
||||
import {PlaydateRepository} from "../../Repositories/PlaydateRepository";
|
||||
import {GroupModel} from "../../Models/GroupModel";
|
||||
import playdate from "../../Database/tables/Playdate";
|
||||
|
||||
export class PlaydatesCommand implements Command, AutocompleteCommand, ChatInteractionCommand {
|
||||
static REGEX = [
|
||||
|
|
@ -24,7 +18,7 @@ export class PlaydatesCommand implements Command, AutocompleteCommand, ChatInter
|
|||
]
|
||||
|
||||
definition(): SlashCommandBuilder {
|
||||
// @ts-ignore
|
||||
// @ts-expect-error Command builder is improperly marked as incomplete.
|
||||
return new SlashCommandBuilder()
|
||||
.setName("playdates")
|
||||
.setDescription("Manage your playdates")
|
||||
|
|
@ -106,7 +100,7 @@ export class PlaydatesCommand implements Command, AutocompleteCommand, ChatInter
|
|||
to_time: new Date(toDate),
|
||||
}
|
||||
|
||||
const id = playdateRepo.create(playdate);
|
||||
playdateRepo.create(playdate);
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setTitle("Created a play-date.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue