11import { createEvent } from '@base' ;
2- import { env } from '@env' ;
32import { logger } from '@fx/utils/logger.js' ;
4- import { isShardManager } from '@basedir/discord/client/bot/sharding.js' ;
53import { loadWorkers } from '@basedir/discord/client/bot/loaders.js' ;
64import { preloadBlacklistCache } from '@basedir/discord/client/bot/middleware.js' ;
75import { ActivityType } from 'discord.js' ;
8- import { AutoPoster } from 'topgg-autoposter' ;
96import { MusicController } from '@basedir/music/MusicController.js' ;
107import type { KoxikClient } from '@basedir/discord/client/bot/CustomClient.js' ;
118import { setupMusicPresence } from '@app/discord/utils/musicPresence.js' ;
@@ -41,27 +38,27 @@ export default createEvent({
4138 type : ActivityType . Watching ,
4239 } ,
4340 {
44- name : ` slash commands` ,
41+ name : ' slash commands' ,
4542 type : ActivityType . Listening ,
4643 } ,
4744 {
48- name : ` async dreams` ,
45+ name : ' async dreams' ,
4946 type : ActivityType . Playing ,
5047 } ,
5148 {
52- name : ` TypeScript thoughts` ,
49+ name : ' TypeScript thoughts' ,
5350 type : ActivityType . Competing ,
5451 } ,
5552 {
56- name : ` online… probably` ,
53+ name : ' online… probably' ,
5754 type : ActivityType . Playing ,
5855 } ,
5956 ] ;
6057 } ;
6158
6259 let index = 0 ;
6360
64- setInterval ( async ( ) => {
61+ setInterval ( ( ) => {
6562 if ( musicController . musicModeActive ) return ;
6663
6764 const statuses = getStatuses ( ) ;
@@ -74,25 +71,6 @@ export default createEvent({
7471 index ++ ;
7572 } , 60_000 ) ;
7673
77- if ( env . TOPGG_TOKEN ) {
78- if ( process . env . KOXIK_SHARD === 'true' ) {
79- const report = ( ) => {
80- if ( ! process . send ) return ;
8174
82- process . send ( {
83- type : 'GUILD_COUNT' ,
84- shardId : Number ( process . env . SHARD_ID ) ,
85- count : client . guilds . cache . size ,
86- } ) ;
87- } ;
88-
89- report ( ) ;
90- setInterval ( report , 30 * 60 * 1000 ) ;
91- } else if ( ! isShardManager ( ) ) {
92- AutoPoster ( env . TOPGG_TOKEN ! , client ) . on ( 'posted' , ( ) => {
93- logger . success ( 'Posted stats on top.gg!' ) ;
94- } ) ;
95- }
96- }
9775 } ,
9876} ) ;
0 commit comments