Remove useless async code
This commit is contained in:
parent
799b04e936
commit
5ce0960606
3 changed files with 25 additions and 25 deletions
|
@ -20,7 +20,7 @@ export class Events {
|
|||
|
||||
// Emit when a message is sent
|
||||
// Used to check for commands
|
||||
public async onMessage(message: Message): Promise<IEventResponse> {
|
||||
public onMessage(message: Message): IEventResponse {
|
||||
if (!message.guild) return {
|
||||
valid: false,
|
||||
message: "Message was not sent in a guild, ignoring.",
|
||||
|
@ -42,7 +42,7 @@ export class Events {
|
|||
message: "Command name was not found",
|
||||
};
|
||||
|
||||
const res = await this._util.loadCommand(name, args, message);
|
||||
const res = this._util.loadCommand(name, args, message);
|
||||
|
||||
if (!res.valid) {
|
||||
return {
|
||||
|
|
|
@ -16,7 +16,7 @@ export interface IUtilResponse extends IBaseResponse {
|
|||
|
||||
// Util Class
|
||||
export class Util {
|
||||
public async loadCommand(name: string, args: string[], message: Message): Promise<IUtilResponse> {
|
||||
public loadCommand(name: string, args: string[], message: Message): IUtilResponse {
|
||||
if (!message.member) return {
|
||||
valid: false,
|
||||
message: "Member is not part of message",
|
||||
|
|
Reference in a new issue