1
0
forked from noxious/server

Renamed folder

This commit is contained in:
2024-12-28 22:12:59 +01:00
parent 0bc81ba4cc
commit e1ff2fefe1
49 changed files with 2 additions and 2 deletions

View File

@ -0,0 +1,17 @@
import { BaseEvent } from '#application/base/baseEvent'
import WeatherManager from '#managers/weatherManager'
export default class Weather extends BaseEvent {
public listen(): void {
this.socket.on('weather', this.handleEvent.bind(this))
}
private async handleEvent(): Promise<void> {
try {
const weather = WeatherManager.getWeatherState()
this.socket.emit('weather', weather)
} catch (error: any) {
this.logger.error('weather error: ' + error.message)
}
}
}