support once too
This commit is contained in:
parent
8a5778d8b9
commit
b9ddfc5c22
1 changed files with 6 additions and 0 deletions
|
@ -29,6 +29,12 @@ export default async (client: Client) => {
|
||||||
const event_type = event_type_ext.join(".");
|
const event_type = event_type_ext.join(".");
|
||||||
|
|
||||||
if (event_category == "player") {
|
if (event_category == "player") {
|
||||||
|
if (once) {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
return client.player.once(event_type as keyof PlayerEvents, (...args: any) =>
|
||||||
|
execute(...args, client)
|
||||||
|
);
|
||||||
|
}
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
return client.player.on(event_type as keyof PlayerEvents, (...args: any) =>
|
return client.player.on(event_type as keyof PlayerEvents, (...args: any) =>
|
||||||
execute(...args, client)
|
execute(...args, client)
|
||||||
|
|
Loading…
Reference in a new issue