mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 08:20:58 -05:00
Prevent MP function from throwing errors.
This commit is contained in:
parent
e4f8ab6dfd
commit
15c7527c6d
@ -83,6 +83,7 @@ export default async(client:TClient,Channel:string,Message:string,ServerName:str
|
||||
const serverLog = client.channels.resolve(client.config.mainServer.channels.fs_server_log) as Discord.TextChannel;
|
||||
const playersOnServer = DSS.data.slots?.players.filter(x=>x.isUsed);
|
||||
const playersInCache = client.MPServerCache.players;
|
||||
if (!playersOnServer) return console.error('[MPLoop] Empty filter, ignoring...'); // For the love of god, stop throwing errors everytime.
|
||||
playersOnServer.forEach(player=>playerData.push(`**${player.name} ${player.isAdmin ? '| admin' : ''}**\nFarming for ${client.formatPlayerUptime(player.uptime)}`));
|
||||
|
||||
ServerName = client.MPServerCache.name;
|
||||
|
Loading…
Reference in New Issue
Block a user