Discord Bot Maker

Discord Bot Maker

View Stats:
ethanlee3706 Mar 31, 2023 @ 9:10am
Cant send embed message in Run Script
Im having several problems trying to send my embed via a run script, everything I have tried returns an error, can anyone direct me on how to create this sort of function.
Last edited by ethanlee3706; Mar 31, 2023 @ 9:43am
< >
Showing 1-1 of 1 comments
TMGiorgio Apr 2, 2023 @ 11:16pm 
can u give me the raw data so i can look thru and see what the problem is, i will then looks for the problem and send you the solution as well a guid on how to fix it.


To send an embed message in the "Run Script too" feature, you can use the Discord.js library.

Here's an example code snippet that you can use in the "Run Script too" feature to send an embed message:

---------------------------------------------------------------------
csharp

const Discord = require('discord.js');
const embed = new Discord.MessageEmbed()
.setColor('#0099ff')
.setTitle('Example Embed')
.setDescription('This is an example embed message.');

const channel = client.channels.cache.get('YOUR_CHANNEL_ID');
if (channel) {
channel.send(embed);
}
------------------------------------------------------------------

Make sure to replace 'YOUR_CHANNEL_ID' with the actual ID of the channel where you want to send the message.
< >
Showing 1-1 of 1 comments
Per page: 1530 50