Feature/81 slash command support (#192)
* Update discord.js * Migrate to slash commands * Clean up imports * Update permissions * Fix guild-specific commands not showing up * Fix changes requested
This commit is contained in:
parent
0465697b87
commit
ed8f5927c8
52 changed files with 1469 additions and 1850 deletions
|
@ -1,7 +1,6 @@
|
|||
import { Client } from "discord.js";
|
||||
import * as dotenv from "dotenv";
|
||||
import { createConnection } from "typeorm";
|
||||
import DefaultValues from "../constants/DefaultValues";
|
||||
import ICommandItem from "../contracts/ICommandItem";
|
||||
import IEventItem from "../contracts/IEventItem";
|
||||
import { Command } from "../type/command";
|
||||
|
@ -47,14 +46,13 @@ export class CoreClient extends Client {
|
|||
return;
|
||||
});
|
||||
|
||||
super.on("messageCreate", (message) => {
|
||||
this._events.onMessageCreate(message, CoreClient._commandItems)
|
||||
});
|
||||
super.on("interactionCreate", this._events.onInteractionCreate);
|
||||
super.on("ready", this._events.onReady);
|
||||
|
||||
super.login(process.env.BOT_TOKEN);
|
||||
await super.login(process.env.BOT_TOKEN);
|
||||
|
||||
this._util.loadEvents(this, CoreClient._eventItems);
|
||||
this._util.loadSlashCommands(this);
|
||||
}
|
||||
|
||||
public static RegisterCommand(name: string, command: Command, serverId?: string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue