mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
Change depth level
This commit is contained in:
parent
7f48ed4e82
commit
c2a7725546
@ -29,7 +29,7 @@ export default {
|
|||||||
const consoleLog = console.log;
|
const consoleLog = console.log;
|
||||||
console.log = (...args: any[])=>{
|
console.log = (...args: any[])=>{
|
||||||
consoleLog(...args);
|
consoleLog(...args);
|
||||||
consoleOutput += util.formatWithOptions({depth: 2, colors: true}, ...args) + '\n';
|
consoleOutput += util.formatWithOptions({depth: 3, colors: true}, ...args) + '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
const output = await eval(interaction.options.getBoolean('async') ? `(async()=>{${code}})()` : code);
|
const output = await eval(interaction.options.getBoolean('async') ? `(async()=>{${code}})()` : code);
|
||||||
@ -37,7 +37,7 @@ export default {
|
|||||||
if (outVal && outVal.includes && outVal.includes(client.token)) outVal = outVal.replace(client.token, '*'.repeat(8));
|
if (outVal && outVal.includes && outVal.includes(client.token)) outVal = outVal.replace(client.token, '*'.repeat(8));
|
||||||
const embedFields:Discord.APIEmbedField[] = [
|
const embedFields:Discord.APIEmbedField[] = [
|
||||||
{name: 'Input', value: `\`\`\`js\n${code.slice(0,1020)}\n\`\`\``},
|
{name: 'Input', value: `\`\`\`js\n${code.slice(0,1020)}\n\`\`\``},
|
||||||
{name: 'Output', value: `**\`\`\`${UsernameHelper.stripName(outVal === 'string' ? String(outVal) : 'ansi\n'+util.formatWithOptions({depth: 2, colors: true}, '%O', outVal)).slice(0,1012)}\n\`\`\`**`}
|
{name: 'Output', value: `**\`\`\`${UsernameHelper.stripName(outVal === 'string' ? String(outVal) : 'ansi\n'+util.formatWithOptions({depth: 3, colors: true}, '%O', outVal)).slice(0,1012)}\n\`\`\`**`}
|
||||||
];
|
];
|
||||||
if (consoleOutput) embedFields.push({name: 'Console', value: `**\`\`\`ansi\n${UsernameHelper.stripName(consoleOutput).slice(0,1008)}\n\`\`\`**`});
|
if (consoleOutput) embedFields.push({name: 'Console', value: `**\`\`\`ansi\n${UsernameHelper.stripName(consoleOutput).slice(0,1008)}\n\`\`\`**`});
|
||||||
if (typeof output === 'object') {
|
if (typeof output === 'object') {
|
||||||
|
Loading…
Reference in New Issue
Block a user