From 3cec154343ccb6a68536b8337d25aa938f23158b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Tue, 6 Jun 2023 03:51:40 +0300 Subject: [PATCH] Simplicy Commands --- src/client/commands.ts | 3 +-- src/client/events/ready.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/commands.ts b/src/client/commands.ts index 997c7da..b0a9183 100644 --- a/src/client/commands.ts +++ b/src/client/commands.ts @@ -21,8 +21,7 @@ export interface command { execute: any } -export default { - async execute(client: RadioClient) { +export default async function commands(client: RadioClient) { const commands : command[] = [ bug, help, invite, list, maintenance, next, nowplaying, play, prev, statistics, status, stop ]; for(const command of commands){ diff --git a/src/client/events/ready.ts b/src/client/events/ready.ts index 47e6865..ec75ba3 100644 --- a/src/client/events/ready.ts +++ b/src/client/events/ready.ts @@ -62,7 +62,7 @@ export default async function ready(client: RadioClient) { client.statistics.calculateGlobal(client); /*COMMANDS*/ - commands.execute(client); + commands(client); /*RADIO*/ client.radio = new Radio();