Skip to content

Commit 44ad734

Browse files
committed
fix: register all events has once bug
1 parent 46cbaa6 commit 44ad734

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/register.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import consola from 'consola'
33
import { colors } from 'consola/utils'
44
import { toOption, resolveOption } from './utils'
55
import { ctx } from './harmonix'
6-
import { ParsedInputs, type Harmonix, type ParsedOptions } from './types'
6+
import type { Harmonix, ParsedInputs, ParsedOptions } from './types'
77

88
export const registerEvents = (harmonix: Harmonix) => {
99
for (const [, event] of harmonix.events.filter((evt) => !evt.options.type)) {
@@ -15,7 +15,7 @@ export const registerEvents = (harmonix: Harmonix) => {
1515
})
1616
})
1717
} else {
18-
harmonix.client?.once(event.options.name!, (...args) => {
18+
harmonix.client?.on(event.options.name!, (...args) => {
1919
ctx.call(harmonix, () => {
2020
event.callback(...(args as ClientEvents[keyof ClientEvents]))
2121
})

0 commit comments

Comments
 (0)