Skip to content

Commit

Permalink
Chore: add todo, delete semicolon
Browse files Browse the repository at this point in the history
  • Loading branch information
PleahMaCaka committed May 1, 2022
1 parent ba06b7a commit 9bde7d1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/Client.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { Client as ClientJS, ClientOptions, Interaction } from "discord.js";
import { Slash } from "./ts/interface/Slash";
import { SlashInfo } from "./ts/interface/SlashInfo";
import { REST } from "@discordjs/rest";
import { Routes } from "discord-api-types/v9";
import { DeployType } from "./ts/types/DeployType";
import { Client as ClientJS, ClientOptions, Interaction } from "discord.js"
import { Slash } from "./ts/interface/Slash"
import { SlashInfo } from "./ts/interface/SlashInfo"
import { REST } from "@discordjs/rest"
import { Routes } from "discord-api-types/v9"
import { DeployType } from "./ts/types/DeployType"

export class Client extends ClientJS {


debug: boolean

constructor(options: ClientOptions, debug?: boolean) {
Expand Down Expand Up @@ -42,7 +41,7 @@ export class Client extends ClientJS {

private _slashInteractionHandler() {
this.on('interactionCreate', async (interaction: Interaction) => {
if (!interaction.isCommand()) return;
if (!interaction.isCommand()) return

try {
await Client._allSlash.get(interaction.commandName)!!.execute(interaction, this)
Expand All @@ -55,6 +54,7 @@ export class Client extends ClientJS {
// deploy the slash command
public deploy(token: string, deployType: DeployType = "GUILD") {
// TODO GLOBAL DEPLOY
// TODO Automatic command deploy when the bot join to the guild
this._slashInteractionHandler()
const rest = new REST({ version: '9' }).setToken(token)

Expand All @@ -78,4 +78,4 @@ export class Client extends ClientJS {
}
})
}
}
}

0 comments on commit 9bde7d1

Please sign in to comment.