30 lines
746 B
TypeScript
30 lines
746 B
TypeScript
import { Application, ChannelService } from 'pinus';
|
||
import { sendAllGuildRanks, sendGuildActEndMsg } from '../../../services/guildActivityService';
|
||
|
||
export default function (app: Application) {
|
||
return new GuildActivityRemote(app);
|
||
}
|
||
|
||
export class GuildActivityRemote {
|
||
|
||
constructor(private app: Application) {
|
||
this.app = app;
|
||
this.channelService = app.get('channelService');
|
||
}
|
||
|
||
private channelService: ChannelService;
|
||
|
||
/**
|
||
* 从systimer服分发到guild各个服,发送排行榜数据
|
||
*/
|
||
public async sendRankToGuilds() {
|
||
await sendAllGuildRanks();
|
||
}
|
||
|
||
/**
|
||
* 发送结束活动消息
|
||
*/
|
||
public async guildActivityEnd() {
|
||
await sendGuildActEndMsg();
|
||
}
|
||
} |