lordwolfy
lordwolfy
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
const tagCommandsString = taggedCommands.map((cmd) => `\`/${cmd.name}\``).join(' \n ');
embed.addFields([
{ name: `${tag}`, value: `${tagCommandsString}\`` }
]);

});
const tagCommandsString = taggedCommands.map((cmd) => `\`/${cmd.name}\``).join(' \n ');
embed.addFields([
{ name: `${tag}`, value: `${tagCommandsString}\`` }
]);

});
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
okay so now whats wrong here
/workspaces/codespaces-blank/commands/help.js:70
});
^

SyntaxError: Unexpected token ')'
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1153:20)
at Module._compile (node:internal/modules/cjs/loader:1205:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at /workspaces/codespaces-blank/bot.js:71:21
at Array.forEach (<anonymous>)
/workspaces/codespaces-blank/commands/help.js:70
});
^

SyntaxError: Unexpected token ')'
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1153:20)
at Module._compile (node:internal/modules/cjs/loader:1205:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at /workspaces/codespaces-blank/bot.js:71:21
at Array.forEach (<anonymous>)
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
yeah
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
i didnt mean to i meant to delete the code lol
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
that one
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
embed.addFields([ { name: ${tag}, value:`tagCommandsString``)join(' \n ') } ]) });
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
wrong code
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
oop
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
now i get an error trying to load the command /workspaces/codespaces-blank/commands/help.js:67 embed.addFields(name: tag, value: tagCommandsString); ^^^^ SyntaxError: missing ) after argument list at internalCompileFunction (node:internal/vm:73:18) at wrapSafe (node:internal/modules/cjs/loader:1153:20) at Module._compile (node:internal/modules/cjs/loader:1205:27) at Module._extensions..js (node:internal/modules/cjs/loader:1295:10) at Module.load (node:internal/modules/cjs/loader:1091:32) at Module._load (node:internal/modules/cjs/loader:938:12) at Module.require (node:internal/modules/cjs/loader:1115:19) at require (node:internal/modules/helpers:130:18) at /workspaces/codespaces-blank/bot.js:71:21 at Array.forEach (<anonymous>)
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
ohh
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
but i did
if (taggedCommands.length > 0) {
const tagCommandsString = taggedCommands.map((cmd) => `\`/${cmd.name}${cmd.tags}\``).join(' \n ');
embed.addFields(tag, tagCommandsString);
}
});
if (taggedCommands.length > 0) {
const tagCommandsString = taggedCommands.map((cmd) => `\`/${cmd.name}${cmd.tags}\``).join(' \n ');
embed.addFields(tag, tagCommandsString);
}
});
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
[]
0
[]
0
[
{
name: 'statistic',
description: 'View your bot statistics.',
tags: [ 'Other' ],
showHelp: true,
options: []
},
{
name: 'channel',
description: 'It allows you to set the channel or channels where the bot can be used.',
tags: [ 'Other' ],
showHelp: true,
options: [ [Object], [Object] ]
},
{
name: 'help',
description: 'It helps you get information about the bot and commands.',
tags: [ 'Other' ],
showHelp: true,
options: [ [Object] ]
},
{
name: 'language',
description: 'It allows you to set the language of the bot.',
tags: [ 'Other' ],
showHelp: true,
options: []
},
{
name: 'ping',
description: 'It helps you to get information about the speed of the bot.',
tags: [ 'Other' ],
showHelp: true,
options: []
}
]
5
CombinedPropertyError (2)
Received one or more errors

input[0]
| ValidationError > s.object(T)
| Expected the value to be an object, but received string instead
|
| Received:
| | 'Other'

input[1]
| ValidationError > s.object(T)
| Expected the value to be an object, but received string instead
|
| Received:
| | '`/statisticOther` \n `/channelOther` \n `/helpOther` \n `/languageOther` \n `/pingOther`'

at _ArrayValidator.handle (/workspaces/codespaces-blank/node_modules/@sapphire/shapeshift/dist/index.js:480:70)
at _ArrayValidator.parse (/workspaces/codespaces-blank/node_modules/@sapphire/shapeshift/dist/index.js:216:88)
at EmbedBuilder.addFields (/workspaces/codespaces-blank/node_modules/@discordjs/builders/dist/index.js:225:31)
at /workspaces/codespaces-blank/commands/help.js:67:19
at Array.forEach (<anonymous>)
at Object.run (/workspaces/codespaces-blank/commands/help.js:57:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[]
0
[]
0
[
{
name: 'statistic',
description: 'View your bot statistics.',
tags: [ 'Other' ],
showHelp: true,
options: []
},
{
name: 'channel',
description: 'It allows you to set the channel or channels where the bot can be used.',
tags: [ 'Other' ],
showHelp: true,
options: [ [Object], [Object] ]
},
{
name: 'help',
description: 'It helps you get information about the bot and commands.',
tags: [ 'Other' ],
showHelp: true,
options: [ [Object] ]
},
{
name: 'language',
description: 'It allows you to set the language of the bot.',
tags: [ 'Other' ],
showHelp: true,
options: []
},
{
name: 'ping',
description: 'It helps you to get information about the speed of the bot.',
tags: [ 'Other' ],
showHelp: true,
options: []
}
]
5
CombinedPropertyError (2)
Received one or more errors

input[0]
| ValidationError > s.object(T)
| Expected the value to be an object, but received string instead
|
| Received:
| | 'Other'

input[1]
| ValidationError > s.object(T)
| Expected the value to be an object, but received string instead
|
| Received:
| | '`/statisticOther` \n `/channelOther` \n `/helpOther` \n `/languageOther` \n `/pingOther`'

at _ArrayValidator.handle (/workspaces/codespaces-blank/node_modules/@sapphire/shapeshift/dist/index.js:480:70)
at _ArrayValidator.parse (/workspaces/codespaces-blank/node_modules/@sapphire/shapeshift/dist/index.js:216:88)
at EmbedBuilder.addFields (/workspaces/codespaces-blank/node_modules/@discordjs/builders/dist/index.js:225:31)
at /workspaces/codespaces-blank/commands/help.js:67:19
at Array.forEach (<anonymous>)
at Object.run (/workspaces/codespaces-blank/commands/help.js:57:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
but now error
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
okay now it returns the length
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
wait its .length not size
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
but size is undefined
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
the first two tags
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
[] undefined [] undefined
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
[]
undefined
[]
undefined
[
{
name: 'statistic',
description: 'View your bot statistics.',
tags: [ 'Other' ],
showHelp: true,
options: []
},
{
name: 'channel',
description: 'It allows you to set the channel or channels where the bot can be used.',
tags: [ 'Other' ],
showHelp: true,
options: [ [Object], [Object] ]
},
{
name: 'help',
description: 'It helps you get information about the bot and commands.',
tags: [ 'Other' ],
showHelp: true,
options: [ [Object] ]
},
{
name: 'language',
description: 'It allows you to set the language of the bot.',
tags: [ 'Other' ],
showHelp: true,
options: []
},
{
name: 'ping',
description: 'It helps you to get information about the speed of the bot.',
tags: [ 'Other' ],
showHelp: true,
options: []
}
]
undefined
[]
undefined
[]
undefined
[
{
name: 'statistic',
description: 'View your bot statistics.',
tags: [ 'Other' ],
showHelp: true,
options: []
},
{
name: 'channel',
description: 'It allows you to set the channel or channels where the bot can be used.',
tags: [ 'Other' ],
showHelp: true,
options: [ [Object], [Object] ]
},
{
name: 'help',
description: 'It helps you get information about the bot and commands.',
tags: [ 'Other' ],
showHelp: true,
options: [ [Object] ]
},
{
name: 'language',
description: 'It allows you to set the language of the bot.',
tags: [ 'Other' ],
showHelp: true,
options: []
},
{
name: 'ping',
description: 'It helps you to get information about the speed of the bot.',
tags: [ 'Other' ],
showHelp: true,
options: []
}
]
undefined
66 replies
DIAdiscord.js - Imagine an app
Created by lordwolfy on 10/19/2023 in #djs-questions
issue with help command
const commands = client.commands.filter(x => x.showHelp !== false);
const tagsToDisplay = ["Music", "Moderation", "Other"]; // Add your desired tags here
const embed = new EmbedBuilder()
.setColor(client.config.embedColor)
.setTitle("Musi's Help GUI")
.setDescription(lang.msg32)
.setTimestamp()
.addFields([
{ name: `${lang.msg33}`, value: commands.map(x => `\`/${x.name} | ${x.tags}\``).join(' \n ') }
])
.setFooter({ text: "https://musibot.lag.tf" }); // Fix the error



const commands = client.commands.filter(x => x.showHelp !== false);
const tagsToDisplay = ["Music", "Moderation", "Other"]; // Add your desired tags here
const embed = new EmbedBuilder()
.setColor(client.config.embedColor)
.setTitle("Musi's Help GUI")
.setDescription(lang.msg32)
.setTimestamp()
.addFields([
{ name: `${lang.msg33}`, value: commands.map(x => `\`/${x.name} | ${x.tags}\``).join(' \n ') }
])
.setFooter({ text: "https://musibot.lag.tf" }); // Fix the error



this can get the tag with x.tags hmm
66 replies