なんかもうめっちゃ変えた

This commit is contained in:
syuilo 2022-09-18 03:27:08 +09:00 committed by GitHub
parent d9ab03f086
commit b75184ec8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
946 changed files with 41219 additions and 28839 deletions

View file

@ -1,9 +1,10 @@
import Xev from 'xev';
import { Inject, Injectable } from '@nestjs/common';
import Channel from '../channel.js';
const ev = new Xev();
export default class extends Channel {
class ServerStatsChannel extends Channel {
public readonly chName = 'serverStats';
public static shouldShare = true;
public static requireCredential = false;
@ -40,3 +41,20 @@ export default class extends Channel {
ev.removeListener('serverStats', this.onStats);
}
}
@Injectable()
export class ServerStatsChannelService {
public readonly shouldShare = ServerStatsChannel.shouldShare;
public readonly requireCredential = ServerStatsChannel.requireCredential;
constructor(
) {
}
public create(id: string, connection: Channel['connection']): ServerStatsChannel {
return new ServerStatsChannel(
id,
connection,
);
}
}