Liksream
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
hero
30 replies
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
you see under there is Logged in as blabla but when i try to write further i cant write and C:\ doesnt come back
30 replies
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
30 replies
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
hero
30 replies
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
yow shi thx
30 replies
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
do i need ?
30 replies
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
no
30 replies
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
eumh u mean my discord app ?
30 replies
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
but no /text dont work it even doesnt appears
30 replies
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
yeah and works to
30 replies
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
30 replies
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
node ?
30 replies
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
looked for tutorials on ytb and needed a little help :FeelsDonkMan:
30 replies
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
my deploy commands const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v9');
const TOKEN = '';
const CLIENT_ID = '1301979763543506976'; const commands = [ { name: 'text', description: 'Sends a custom message with a colored border and image.', }, { name: 'test', description: 'A simple test command.',
}, ]; const rest = new REST({ version: '9' }).setToken(TOKEN); (async () => { try { console.log('Started refreshing application (/) commands.'); await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands, }); console.log('Successfully reloaded application (/) commands.'); } catch (error) { console.error(error); } })();
const CLIENT_ID = '1301979763543506976'; const commands = [ { name: 'text', description: 'Sends a custom message with a colored border and image.', }, { name: 'test', description: 'A simple test command.',
}, ]; const rest = new REST({ version: '9' }).setToken(TOKEN); (async () => { try { console.log('Started refreshing application (/) commands.'); await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands, }); console.log('Successfully reloaded application (/) commands.'); } catch (error) { console.error(error); } })();
30 replies
DIAdiscord.js - Imagine an app
•Created by Liksream on 11/1/2024 in #djs-questions
trying making a bot that send custom message
this is my index.js const { Client, GatewayIntentBits, EmbedBuilder } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] });
const TOKEN = 'meh';
client.once('ready', () => {
console.log(
await interaction.reply('This is a test response!'); } }); client.login(TOKEN);
Logged in as ${client.user.tag}
);
});
client.on('interactionCreate', async (interaction) => {
if (!interaction.isCommand()) return;
const { commandName } = interaction;
if (commandName === 'text') {
const customText = 'Your Custom Text Here';
const borderColor = '#FF0000';
const imageUrl = 'https://example.com/your-image.png';
const embed = new EmbedBuilder()
.setColor(borderColor)
.setDescription(customText)
.setImage(imageUrl)
.setTimestamp();
await interaction.reply({ embeds: [embed] });
} else if (commandName === 'test') {await interaction.reply('This is a test response!'); } }); client.login(TOKEN);
30 replies