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 +0,0 @@
|
|||
export enum CommandResponse {
|
||||
Ok,
|
||||
Unauthorised,
|
||||
ServerNotSetup,
|
||||
NotInServer,
|
||||
FeatureDisabled,
|
||||
}
|
3
src/constants/EmbedColours.ts
Normal file
3
src/constants/EmbedColours.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
export default class EmbedColours {
|
||||
public static readonly Ok = 0x3050ba;
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
import { CommandResponse } from "./CommandResponse";
|
||||
|
||||
export default class ErrorMessages {
|
||||
public static readonly InsufficientBotPermissions = "Unable to do this action, am I missing permissions?";
|
||||
public static readonly ChannelNotFound = "Unable to find channel";
|
||||
public static readonly RoleNotFound = "Unable to find role";
|
||||
|
||||
public static readonly UserUnauthorised = "You are not authorised to use this command";
|
||||
public static readonly ServerNotSetup = "This server hasn't been setup yet, please run the setup command";
|
||||
public static readonly NotInServer = "This command requires to be ran inside of a server";
|
||||
public static readonly FeatureDisabled = "This feature is currently disabled by a server moderator";
|
||||
|
||||
public static GetErrorMessage(response: CommandResponse): string {
|
||||
switch (response) {
|
||||
case CommandResponse.Unauthorised:
|
||||
return this.UserUnauthorised;
|
||||
case CommandResponse.ServerNotSetup:
|
||||
return this.ServerNotSetup;
|
||||
case CommandResponse.NotInServer:
|
||||
return this.NotInServer;
|
||||
case CommandResponse.FeatureDisabled:
|
||||
return this.FeatureDisabled;
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue