1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 04:10:59 -05:00

idk anymore

This commit is contained in:
toast-ts 2023-05-12 12:54:38 +10:00
parent 9b56952c4c
commit 8b6036e8f0
3 changed files with 5 additions and 7 deletions

View File

@ -80,7 +80,7 @@ export default async(client:TClient,Channel:string,Message:string,ServerName:str
const serverIndicatorEmbed =(indicator:string)=>new client.embed().setTitle(`**${ServerName}** is now ${indicator}`).setColor(client.config.embedColorOrange).setTimestamp(); const serverIndicatorEmbed =(indicator:string)=>new client.embed().setTitle(`**${ServerName}** is now ${indicator}`).setColor(client.config.embedColorOrange).setTimestamp();
const serverLog = client.channels.resolve(client.config.mainServer.channels.fs_server_log) as Discord.TextChannel; 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 playersOnServer = DSS.data.slots?.players.filter(x=>x.isUsed);
const playersInCache = client.MPServerCache.players; const playersInCache = client.MPServerCache.players;
playersOnServer.forEach(player=>playerData.push(`**${player.name} ${player.isAdmin ? '| admin' : ''}**\nFarming for ${client.formatPlayerUptime(player.uptime)}`)); playersOnServer.forEach(player=>playerData.push(`**${player.name} ${player.isAdmin ? '| admin' : ''}**\nFarming for ${client.formatPlayerUptime(player.uptime)}`));

View File

@ -48,11 +48,10 @@ export default {
if (error) return; if (error) return;
if (typeof output === 'object') output = 'js\n'+util.formatWithOptions({depth: 1}, '%O', output) if (typeof output === 'object') output = 'js\n'+util.formatWithOptions({depth: 1}, '%O', output)
else output = '\n' + String(output); else output = '\n' + String(output);
[
[client.tokens.main,client.tokens.beta,client.tokens.toast,client.tokens.tae,client.tokens.octokit,client.tokens.webhook_url,client.tokens.webhook_url_test,client.tokens.mongodb_uri,client.tokens.mongodb_uri_dev].forEach((x)=>{ client.tokens.main,client.tokens.beta,client.tokens.toast,client.tokens.webhook_url,
const regexp = new RegExp(x as string,'g'); client.tokens.webhook_url_test,client.tokens.mongodb_uri,client.tokens.mongodb_uri_dev,client.tokens.octokit
output = output.replace(regexp, ':noblank: No token?'); ].forEach(x=>output = output.replace(new RegExp(x as string,'g'),':noblank: No token?'));
})
const embed = new client.embed().setColor(client.config.embedColor).setTitle('__Eval__').addFields( const embed = new client.embed().setColor(client.config.embedColor).setTitle('__Eval__').addFields(
{name: 'Input', value: `\`\`\`js\n${code.slice(0,1010)}\n\`\`\``}, {name: 'Input', value: `\`\`\`js\n${code.slice(0,1010)}\n\`\`\``},
{name: 'Output', value: `\`\`\`${removeUsername(output).slice(0,1016)}\n\`\`\``} {name: 'Output', value: `\`\`\`${removeUsername(output).slice(0,1016)}\n\`\`\``}

View File

@ -125,7 +125,6 @@ export interface Tokens {
main: string main: string
beta: string beta: string
toast: string toast: string
tae: string
octokit: string octokit: string
webhook_url: string webhook_url: string
webhook_url_test: string webhook_url_test: string