Sexus Prime
Sexus Prime
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 7/9/2023 in #djs-questions
send base64 string on Embed
image is not showing @.gwapes
const imageBuffer = Buffer.from(imagemQrcode)

const embed = new EmbedBuilder()
.setImage('attachment://qrcode')
.setDescription(`chave: \`${qrcode}\``);

const attachment = new AttachmentBuilder(imageBuffer, { name: 'qrcode' })

interaction.editReply({ embeds: [embed], files: [attachment] })
const imageBuffer = Buffer.from(imagemQrcode)

const embed = new EmbedBuilder()
.setImage('attachment://qrcode')
.setDescription(`chave: \`${qrcode}\``);

const attachment = new AttachmentBuilder(imageBuffer, { name: 'qrcode' })

interaction.editReply({ embeds: [embed], files: [attachment] })
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
@luna🌈 @qjuh worked, tks!
13 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
ok, i gonna try..
13 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
memory: πŸ”₯
13 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
but how would I not be logged in if the guild returns the data?
13 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
node: v18.15.0
13 replies
DDeno
Created by PNPerson on 6/17/2023 in #help
Using discord.js in Deno?
<:cookie_deno:1002977285734932480>
18 replies
DDeno
Created by PNPerson on 6/17/2023 in #help
Using discord.js in Deno?
any status update?
18 replies
DDeno
Created by PNPerson on 6/17/2023 in #help
Using discord.js in Deno?
note: npm:discord.js doesn't work on windows but it works on wsl ubuntu
18 replies
DDeno
Created by Sexus Prime on 3/23/2023 in #help
import cache not working
πŸ€¦β€β™‚οΈ
5 replies
DDeno
Created by Sexus Prime on 3/23/2023 in #help
import cache not working
Resolved: i forgot place /mod.ts in path
5 replies
DDeno
Created by Sexus Prime on 3/23/2023 in #help
import cache not working
I already tested in others packages, none works
5 replies
DDeno
Created by Sexus Prime on 3/23/2023 in #help
import cache not working
5 replies
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 2/11/2023 in #djs-questions
Using djs types globally
thanks bro
7 replies
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 2/11/2023 in #djs-questions
Using djs types globally
I thought about this my whole life before I saw a post about it
7 replies
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 2/11/2023 in #djs-questions
Using djs types globally
sorry about that, i saw that information recently somewhere..
7 replies
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 2/11/2023 in #djs-questions
Using djs types globally
confused.. so if in file A I import discord.js, and in file B I import it again, won't discord.js be loaded twice?
7 replies
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 2/11/2023 in #djs-questions
Using djs types globally
I realized that package is too heavy to be importing in each file, so I found a way to import in a single file. Of course, importing types in typescript won't weigh more, because when compiled it won't appear, but now it's weird to import only the types, and I'm sure there's some way to use global types without needing to import When vscode imports the type, it never puts the "type" keyword so I can end up forgetting to put it and discord.js is imported
7 replies
DIAdiscord.js - Imagine an app
Created by Sexus Prime on 2/7/2023 in #djs-questions
Interaction class
static async run(interaction: ChatInputCommandInteraction) {
console.log()
let groupSubCommand = interaction.options.data.find(d => d.type === 2)?.name;
let subCommand = interaction.options.data.find(d => d.type === 1)?.name;

if(groupSubCommand) {
executionPaths[groupSubCommand][<string>subCommand](interaction);
}
else if(subCommand) {
executionPaths[subCommand](interaction);
}
else {
executionPaths.main(interaction);
}
}
static async run(interaction: ChatInputCommandInteraction) {
console.log()
let groupSubCommand = interaction.options.data.find(d => d.type === 2)?.name;
let subCommand = interaction.options.data.find(d => d.type === 1)?.name;

if(groupSubCommand) {
executionPaths[groupSubCommand][<string>subCommand](interaction);
}
else if(subCommand) {
executionPaths[subCommand](interaction);
}
else {
executionPaths.main(interaction);
}
}
6 replies