Adds deployment for icons
This commit is contained in:
parent
154002f6f3
commit
0e10ea3cab
14 changed files with 1449 additions and 53 deletions
|
|
@ -6,7 +6,7 @@ import {
|
|||
ChatInputCommandInteraction,
|
||||
MessageFlags,
|
||||
Activity,
|
||||
ActivityType
|
||||
ActivityType, REST
|
||||
} from "discord.js";
|
||||
import Commands from "./Commands/Commands";
|
||||
import {Container} from "../Container/Container";
|
||||
|
|
@ -16,17 +16,33 @@ import {UserError} from "./UserError";
|
|||
export class DiscordClient {
|
||||
private readonly client: Client;
|
||||
private commands: Commands;
|
||||
private readonly restClient: REST;
|
||||
|
||||
public get Client (): Client {
|
||||
return this.client;
|
||||
}
|
||||
|
||||
constructor() {
|
||||
public get Commands(): Commands {
|
||||
return this.commands
|
||||
}
|
||||
|
||||
public get RESTClient(): REST {
|
||||
return this.restClient;
|
||||
}
|
||||
|
||||
public get ApplicationId(): string {
|
||||
return this.applicationId;
|
||||
}
|
||||
|
||||
constructor(
|
||||
private readonly applicationId: string
|
||||
) {
|
||||
this.client = new Client({
|
||||
intents: [GatewayIntentBits.Guilds]
|
||||
})
|
||||
|
||||
this.commands = new Commands();
|
||||
this.restClient = new REST();
|
||||
}
|
||||
|
||||
applyEvents() {
|
||||
|
|
@ -52,6 +68,10 @@ export class DiscordClient {
|
|||
this.client.login(token);
|
||||
}
|
||||
|
||||
connectRESTClient(token: string) {
|
||||
this.restClient.setToken(token);
|
||||
}
|
||||
|
||||
private findCommandMethod(interaction: Interaction) {
|
||||
if (interaction.isChatInputCommand()) {
|
||||
const command = this.commands.getCommand(interaction.commandName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue