Soap
Soap
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by Soap on 2/4/2023 in #djs-questions
GatewayIntentBits is not defined
shut up
23 replies
DIAdiscord.js - Imagine an app
Created by Soap on 6/23/2023 in #djs-questions
sharding
i did see that - and tried it. but it didnt quite work.
6 replies
DIAdiscord.js - Imagine an app
Created by Soap on 6/23/2023 in #djs-questions
sharding
node js v 20.2.0
6 replies
DIAdiscord.js - Imagine an app
Created by Soap on 6/23/2023 in #djs-questions
sharding
discord js v 14.11.0
6 replies
DIAdiscord.js - Imagine an app
Created by Soap on 6/7/2023 in #djs-questions
sending message when shard starts
wish
8 replies
DIAdiscord.js - Imagine an app
Created by Soap on 6/7/2023 in #djs-questions
sending message when shard starts
but rip i wish you could just use the bot
8 replies
DIAdiscord.js - Imagine an app
Created by Soap on 6/7/2023 in #djs-questions
sending message when shard starts
yeah, i used that
8 replies
DIAdiscord.js - Imagine an app
Created by Soap on 6/7/2023 in #djs-questions
sending message when shard starts
this trys to get sent whenever a shard is started
8 replies
DIAdiscord.js - Imagine an app
Created by Soap on 6/7/2023 in #djs-questions
sending message when shard starts
const id = "yes";
return client.shard.broadcastEval(async (c, { channelId }) => {
const channel = c.channels.cache.get(channelId);
if (channel) {
channel.send(`:enable: Shard ${shardID + 1}/3 has been launched!`);
return true;
}
return false;
}, { context: { channelId: id } })
.then(console.log);
},
};
const id = "yes";
return client.shard.broadcastEval(async (c, { channelId }) => {
const channel = c.channels.cache.get(channelId);
if (channel) {
channel.send(`:enable: Shard ${shardID + 1}/3 has been launched!`);
return true;
}
return false;
}, { context: { channelId: id } })
.then(console.log);
},
};
8 replies
DIAdiscord.js - Imagine an app
Created by Soap on 6/7/2023 in #djs-questions
sending message when shard starts
node 20.2
8 replies
DIAdiscord.js - Imagine an app
Created by Soap on 5/12/2023 in #djs-questions
author only buttons
yeah i just did it 👍
4 replies
DIAdiscord.js - Imagine an app
Created by Soap on 4/5/2023 in #djs-questions
Avatar error
tyy
14 replies
DIAdiscord.js - Imagine an app
Created by Soap on 4/5/2023 in #djs-questions
Avatar error
wdum
14 replies
DIAdiscord.js - Imagine an app
Created by Soap on 4/5/2023 in #djs-questions
Avatar error
split[1] gives a userid
14 replies
DIAdiscord.js - Imagine an app
Created by Soap on 4/5/2023 in #djs-questions
Avatar error
i believe it does
14 replies
DIAdiscord.js - Imagine an app
Created by Soap on 4/5/2023 in #djs-questions
Avatar error
so what do i need to change
14 replies
DIAdiscord.js - Imagine an app
Created by Soap on 4/5/2023 in #djs-questions
Avatar error
code:
const {
EmbedBuilder,
ActionRowBuilder,
ButtonBuilder,
ButtonStyle,
} = require("discord.js");

module.exports = {
data: {
name: `userinfo`,
},
async execute(interaction, client) {
const message = await interaction.deferReply({
fetchReply: true,
});
let custom = interaction.customId;
let split = custom.split("-");

let user = split[1] || interaction.member;
let userAvatar = user.displayAvatarURL({ size: 1024 });

const username = user.username;
const Discriminator = user.discriminator;
const id = user.id;

const newMessage = ``;
const embed = new EmbedBuilder()
.setTitle(`${username}'s user info`)
.setURL(`https://discordapp.com/users/${id}`)
.setImage(`${userAvatar}`)
.setColor("Random")

.addFields(
{ name: `Username`, value: `${username}`, inline: true },
{ name: `Tag`, value: `${Discriminator}`, inline: true },
{ name: `User ID`, value: `${id}`, inline: true },
{ name: `Profile URL`, value: `[Here!](${userAvatar})`, inline: true }
);

await interaction.editReply({
embeds: [embed],
});
},
};
const {
EmbedBuilder,
ActionRowBuilder,
ButtonBuilder,
ButtonStyle,
} = require("discord.js");

module.exports = {
data: {
name: `userinfo`,
},
async execute(interaction, client) {
const message = await interaction.deferReply({
fetchReply: true,
});
let custom = interaction.customId;
let split = custom.split("-");

let user = split[1] || interaction.member;
let userAvatar = user.displayAvatarURL({ size: 1024 });

const username = user.username;
const Discriminator = user.discriminator;
const id = user.id;

const newMessage = ``;
const embed = new EmbedBuilder()
.setTitle(`${username}'s user info`)
.setURL(`https://discordapp.com/users/${id}`)
.setImage(`${userAvatar}`)
.setColor("Random")

.addFields(
{ name: `Username`, value: `${username}`, inline: true },
{ name: `Tag`, value: `${Discriminator}`, inline: true },
{ name: `User ID`, value: `${id}`, inline: true },
{ name: `Profile URL`, value: `[Here!](${userAvatar})`, inline: true }
);

await interaction.editReply({
embeds: [embed],
});
},
};
14 replies
DIAdiscord.js - Imagine an app
Created by Soap on 4/4/2023 in #djs-questions
find a customid
how do i save ButtonInteraction then
30 replies
DIAdiscord.js - Imagine an app
Created by Soap on 4/4/2023 in #djs-questions
find a customid
but: rawError: { message: 'Cannot send an empty message', code: 50006 },
30 replies
DIAdiscord.js - Imagine an app
Created by Soap on 4/4/2023 in #djs-questions
find a customid
i have:
const {
SlashCommandBuilder,
EmbedBuilder,
ApplicationCommandOptionType,
CommandInteractionOptionResolver,
ActionRowBuilder,
ButtonBuilder,
ButtonStyle,
Events,
ButtonInteraction,
} = require("discord.js");

module.exports = {
data: {
name: `userinfo`,
},
async execute(interaction, client) {
const message = await interaction.deferReply({
fetchReply: true,
});
const custom = ButtonInteraction.customId;
// const split = custom.split(" - ");
// const newMessage = split[1];

await interaction.editReply({
content: custom,
});
},
};
const {
SlashCommandBuilder,
EmbedBuilder,
ApplicationCommandOptionType,
CommandInteractionOptionResolver,
ActionRowBuilder,
ButtonBuilder,
ButtonStyle,
Events,
ButtonInteraction,
} = require("discord.js");

module.exports = {
data: {
name: `userinfo`,
},
async execute(interaction, client) {
const message = await interaction.deferReply({
fetchReply: true,
});
const custom = ButtonInteraction.customId;
// const split = custom.split(" - ");
// const newMessage = split[1];

await interaction.editReply({
content: custom,
});
},
};
30 replies