Sexus Prime
Sexus Prime
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 3/20/2024 in #djs-questions
Diseact: Implement JSX to construct bots!
🚀 Introducing Diseact: Revolutionize Discord Bot Development with JSX! Say goodbye to cumbersome code and embrace simplicity with Diseact – the JavaScript library designed to streamline the creation of Discord API components, embeds, and commands using JSX.
const modal = <modal title="My Modal">
<textinput style={TextInputStyle.Short} required>
What do you think about JSX in Discord bots?
</textinput>
</modal>
const modal = <modal title="My Modal">
<textinput style={TextInputStyle.Short} required>
What do you think about JSX in Discord bots?
</textinput>
</modal>
🎨 Effortless Component Creation: With Diseact, crafting Discord components is as easy as writing JSX code. Say goodbye to complex builder patterns and hello to intuitive JSX syntax. ⚡️ Boost Productivity: By simplifying the creation process, Diseact empowers developers to focus more on building engaging Discord experiences and less on tedious implementation details. ⭐ Give us star on Github! ⬇️ Install the package on NPM!
3 replies
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 7/9/2023 in #djs-questions
send base64 string on Embed
I have an image in a base64 string. how to send this image when embedding in EmbedBuilder? like:
const myBase64 = ...

const embed = new EmbedBuilder()
.setImage(myBase64)

interaction.reply({ embeds: [embed] })
const myBase64 = ...

const embed = new EmbedBuilder()
.setImage(myBase64)

interaction.reply({ embeds: [embed] })
node -v v18.15.0
9 replies
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 7/2/2023 in #djs-questions
Cannot read properties of null on guild.commands.create
sup, see my code:
(this.client.guilds.fetch(process.env.GUILD_TEST)).then(g => {
g.commands.create(command.data);
})
(this.client.guilds.fetch(process.env.GUILD_TEST)).then(g => {
g.commands.create(command.data);
})
command.data and g isn't undefined. error:
{myPrivatePaths}/node_modules/discord.js/src/managers/ApplicationCommandManager.js:52
return Routes.applicationGuildCommands(this.client.application.id, this.guild?.id ?? guildId);
^

TypeError: Cannot read properties of null (reading 'id')
at GuildApplicationCommandManager.commandPath ({myPrivatePaths}/node_modules/discord.js/src/managers/ApplicationCommandManager.js:52:70)
{myPrivatePaths}/node_modules/discord.js/src/managers/ApplicationCommandManager.js:52
return Routes.applicationGuildCommands(this.client.application.id, this.guild?.id ?? guildId);
^

TypeError: Cannot read properties of null (reading 'id')
at GuildApplicationCommandManager.commandPath ({myPrivatePaths}/node_modules/discord.js/src/managers/ApplicationCommandManager.js:52:70)
what's happening?
13 replies
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 2/11/2023 in #djs-questions
Using djs types globally
I can use the djs types globally on typescript? i tried:
// tsconfig
"typeRoots": [
"node_modules/@types",
"node_modules/discord.js/typings",
],
"types": ["discord.js"],
// tsconfig
"typeRoots": [
"node_modules/@types",
"node_modules/discord.js/typings",
],
"types": ["discord.js"],
7 replies
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 2/7/2023 in #djs-questions
Interaction class
I created a handler that loads the commands and executes the run function when they are called, nothing unusual. The problem is that I pass the interaction as an argument to the function, but for some reason, inside the run function it is an incomplete object that does not have some properties like "options", and in the event receiver that executes the run function of commands, it is a class that contains the "options" property, how can I solve this? typescript: 5(beta)
6 replies
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 1/22/2023 in #djs-questions
Error using GuildMember.roles.add()
when i use GuildMember.roles.add, the bot can add the role to member, but this error appears I've already checked the id, and it's the right role id
/home/nicolas/Projetos/decorators.d.js/node_modules/discord.js/src/managers/GuildMemberRoleManager.js:37
return this.guild.roles.cache.filter(role => this.member._roles.includes(role.id)).set(everyone.id, everyone);
^

TypeError: Cannot read properties of undefined (reading 'id')
at GuildMemberRoleManager.get cache (/home/nicolas/Projetos/decorators.d.js/node_modules/discord.js/src/managers/GuildMemberRoleManager.js:37:101)
at GuildMemberRoleManager.add (/home/nicolas/Projetos/decorators.d.js/node_modules/discord.js/src/managers/GuildMemberRoleManager.js:134:31)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
/home/nicolas/Projetos/decorators.d.js/node_modules/discord.js/src/managers/GuildMemberRoleManager.js:37
return this.guild.roles.cache.filter(role => this.member._roles.includes(role.id)).set(everyone.id, everyone);
^

TypeError: Cannot read properties of undefined (reading 'id')
at GuildMemberRoleManager.get cache (/home/nicolas/Projetos/decorators.d.js/node_modules/discord.js/src/managers/GuildMemberRoleManager.js:37:101)
at GuildMemberRoleManager.add (/home/nicolas/Projetos/decorators.d.js/node_modules/discord.js/src/managers/GuildMemberRoleManager.js:134:31)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
node: v16.19.0
5 replies
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 10/18/2022 in #djs-questions
wait post
How i listen posts in Posts channels? like: PostChannel.awaitPost() discord.js: v14.6.0 nodejs: v18.9.1
21 replies
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 9/6/2022 in #djs-questions
Logger for discord.js
There is have a specific logger for discord.js, or one more used for creating discord bots?
7 replies