qr
DIAdiscord.js - Imagine an app
•Created by qr on 12/6/2023 in #djs-questions
edit msg
const { Client, GatewayIntentBits, Events } = require('discord.js');
const { EmbedBuilder } = require('discord.js');
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent]
});
const wait = require('node:timers/promises').setTimeout;
prefix = "."
client.on("messageCreate", message => {
if (message.content.startsWith(prefix + "ping")) {
console.log("2349")
message.channel.send('Pong! :Pingsock:');
}
else if (message.content.startsWith(prefix + "start")) {
const exampleEmbed = new EmbedBuilder()
.setColor(0x0099FF)
.setTitle(':rocket: Initializing bot')
.setThumbnail('https://fortnite-api.com/images/cosmetics/br/cid_035_athena_commando_m_medieval/smallicon.png')
.addFields(
{ name: ':bust_in_silhouette: Account', value: '`Kanyes_chai`' },
)
const consoleembed = new EmbedBuilder()
.setColor(0x0099FF)
.setTitle(':floppy_disk: Console')
.setDescription('
const { Client, GatewayIntentBits, Events } = require('discord.js');
const { EmbedBuilder } = require('discord.js');
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent]
});
const wait = require('node:timers/promises').setTimeout;
prefix = "."
client.on("messageCreate", message => {
if (message.content.startsWith(prefix + "ping")) {
console.log("2349")
message.channel.send('Pong! :Pingsock:');
}
else if (message.content.startsWith(prefix + "start")) {
const exampleEmbed = new EmbedBuilder()
.setColor(0x0099FF)
.setTitle(':rocket: Initializing bot')
.setThumbnail('https://fortnite-api.com/images/cosmetics/br/cid_035_athena_commando_m_medieval/smallicon.png')
.addFields(
{ name: ':bust_in_silhouette: Account', value: '`Kanyes_chai`' },
)
const consoleembed = new EmbedBuilder()
.setColor(0x0099FF)
.setTitle(':floppy_disk: Console')
.setDescription('
')
const consoleembed2 = new EmbedBuilder()
.setColor(0x0099FF)
.setTitle(':floppy_disk: Console')
.setDescription('
')
const consoleembed2 = new EmbedBuilder()
.setColor(0x0099FF)
.setTitle(':floppy_disk: Console')
.setDescription('
')
message.channel.send({ embeds: [exampleEmbed] });
message.channel.send({ embeds: [consoleembed] });
wait(2000);
message.edit({ embeds: [consoleembed2] });
}
}
);
client.once(Events.ClientReady, readyClient => {
console.log(`Ready! Logged in as ${readyClient.user.tag}`);
});
console.log("works");
client.login("");
')
message.channel.send({ embeds: [exampleEmbed] });
message.channel.send({ embeds: [consoleembed] });
wait(2000);
message.edit({ embeds: [consoleembed2] });
}
}
);
client.once(Events.ClientReady, readyClient => {
console.log(`Ready! Logged in as ${readyClient.user.tag}`);
});
console.log("works");
client.login("");
107 replies
DIAdiscord.js - Imagine an app
•Created by qr on 12/6/2023 in #djs-questions
why isnt the command not working
const { Client, Events, GatewayIntentBits } = require('discord.js');
const { token } = "MTE4MTcyMDE2MzYyNDY4NTU4OA.GGJWB-.jDve_yeVH5mxEKITIbwhkoBglccWMOAdKWcvTw"
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
prefix = "."
client.on("message", message => {
if (message.content.startsWith(prefix + "ping")) {
console.log("2349")
message.channel.send('Pong! :Pingsock:');
}
});
client.once(Events.ClientReady, readyClient => {
console.log(`Ready! Logged in as ${readyClient.user.tag}`);
});
console.log("works");
client.login("MTE4MTcyMDE2MzYyNDY4NTU4OA.GGJWB-.jDve_yeVH5mxEKITIbwhkoBglccWMOAdKWcvTw");
const { Client, Events, GatewayIntentBits } = require('discord.js');
const { token } = "MTE4MTcyMDE2MzYyNDY4NTU4OA.GGJWB-.jDve_yeVH5mxEKITIbwhkoBglccWMOAdKWcvTw"
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
prefix = "."
client.on("message", message => {
if (message.content.startsWith(prefix + "ping")) {
console.log("2349")
message.channel.send('Pong! :Pingsock:');
}
});
client.once(Events.ClientReady, readyClient => {
console.log(`Ready! Logged in as ${readyClient.user.tag}`);
});
console.log("works");
client.login("MTE4MTcyMDE2MzYyNDY4NTU4OA.GGJWB-.jDve_yeVH5mxEKITIbwhkoBglccWMOAdKWcvTw");
22 replies