All Questions
Tagged with embed discord.js
132
questions
5
votes
3
answers
27k
views
How can I embed messages using a Discord bot?
I want to code a bot that will embed a user's sent message in a specific channel. If you know anything about GTA RP servers, it's like a Twitter or Instagram bot.
Here's an example:
I think it's ...
4
votes
1
answer
17k
views
How do you make embed pages in discord.js
message.channel.send(bot.guilds.cache.map(g=> "*Name:* **"+g.name +'** *ID:* **'+g.id+"** *Owner:* **"+g.owner.user.tag+"**"))
I have this code to send all guilds, the name id and owner name, ...
4
votes
4
answers
40k
views
Discord.js - how do I edit message.embed() statements?
I am making a ping command -
It is very simple to code, but I haven't got the slightest idea how to edit the embed I'm using. Here is my code - I'm using a command handler explaining the exports.run ...
4
votes
2
answers
4k
views
Multiple lines in one value of an embed (discord.js)
I am trying to create for my needs an embed with my discord.js bot.
Unfortuanlty I can't figure out how to do multiple lines in one value field. I tried with the new line character \n, but this was ...
3
votes
1
answer
25k
views
Change Channel name with a command and also send embed with it
I'm making a discord bot which it will change the specifc name of the channel
Code
if(command === `${prefix}openslot`) {
let embed = new Discord.RichEmbed()
.setColor("#1bc643")
...
3
votes
2
answers
5k
views
Discordjs how i can send a embed message with multi link
I want to make the embed message like the regular music bot like this embed message with the link can click
I want my content is the Description will show and the highlight is a link attach to it ...
3
votes
3
answers
6k
views
Discord js v13 channel filter not working
I'm currently trying to get the total amount of text channels and voice channels to display in my embed, when I try to filter them as I did in discord.js v12 it gives me an output of 0 but if I use no ...
2
votes
2
answers
22k
views
Little image in embed titles, Discord.js
I've been trying to display little images in my embeds titles. But I can't make it work, the whole URL is displayed.
Code I tried to use:
var embed = new Discord.RichEmbed()
.setTitle(...
2
votes
2
answers
1k
views
How can I make a bot that basically makes an embed of a linked site?
I've made a couple discord bots but I'm still very much a novice and I was wondering how I would be able to make a bot that embeds any website (kind of like how YouTube has its video embeds but with ...
2
votes
2
answers
2k
views
Is there a way of making discord embeds better?
I'm developing my own discord bot, my issues are the embeds, are there some trick or modules in node.js that can help me beautify those?
The only thing I had to try were the default embeds, which to ...
1
vote
1
answer
497
views
Embed fields URL discord js
How to put url from field to config.json. But only the url, not the text. From this
.addField("**hi**", `[**Hello**](https:iegbshd)`)
to this
const { hello } = require('../config.json')
....
1
vote
3
answers
11k
views
Discord Node.js | Adding time onto a timestamp in an embed (v12)
I had a question, so I know to add a timestamp to a New Discord.MessageEmbed() you would use .setTimestamp(), however, I was wondering how I would go about adding x amount of time to that timestamp, i....
1
vote
2
answers
3k
views
Edit part of a Message Embed (Discord.JS)
I have a channel that contains 10 embedded messages (1 embed per message). Each embed is a leaderboard for people's best lap times, by Track.
The layout of each embed is
const trackName = new ...
1
vote
2
answers
332
views
How can I make my Embeds more Cleaner in Discord.js?
I would like to know how I can make my embeds more look more cleaner. The embed style I am using is like this:
const Discord = require('discord.js');
const Embed = new Discord.MessageEmbed()
...
1
vote
1
answer
288
views
Array variable inside .setImage() doesn't work. discord.js
I am trying to get my bot to send and embed and I want the gif to change each time, but for some reason when I put the array variable inside the .setImage() it doesn't work. The message is sent, but ...
1
vote
2
answers
2k
views
How to edit embed field value in Discord.js V13
So I am trying to edit one field in an embed.
The fetched embed looks like this:
MessageEmbed {
type: 'rich',
title: null,
description: null,
url: null,
color: 5763719,
timestamp: null,
...
1
vote
1
answer
1k
views
Markdown in embeds discord.js v12
I wanna bold some text in my embed. I searched in google for discord's markdown and tried using ** , but it didn't work. Here is a hastebin with my embed code: https://hastebin.com/gidusegutu.js .
In ...
1
vote
1
answer
2k
views
Send multiple embeds if there are more than 25 fields (Discord.js)
I'd like to know how to send multiple embeds if there are more than 25 fields in an embed constructor. I need it to include the remaining fields(where there may be 75 or more at any given time), while ...
1
vote
1
answer
57
views
Cannot get Discord.js to embed THEN delete
EDIT: Trying to make it more clear. I want the embed listed below in the part where it says EMBED GOES HERE.
Unsure if i can even do that. My structure is calling externally for files named in ...
1
vote
1
answer
4k
views
JS discord bot is getting error: Cannot send an empty message
I'm making a discord bot, but I'm getting the error:
Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a ...
1
vote
1
answer
8k
views
Image not appearing from embedded URL from Discord.js Bot
The problem that I am having right now is that the image is not showing up from the URL that I have embedded. Now usually for Discord, when you send an image link it appears like this:
What usually ...
1
vote
0
answers
139
views
Server info embeds doesn't show on discord server, only says interaction failed and no error in terminal, how to fix?
I was trying to make an embed info command with "info user" and "info server" subcommand. When I try to show the owner's user tag in the embeds it shows undefined so I was told to ...
1
vote
3
answers
237
views
Throwing an error when trying to send a embed
I'm trying to create an embed using discord.js v12 and it keeps showing this error
DiscordAPIError: Cannot send an empty message
Heres my code:
const infoembed = new MessageEmbed()
...
1
vote
2
answers
526
views
Having trouble setting up a reaction role embed for discord.js
I'm a newbie at coding, so please do guide me through this process :)
ive just started coding a discord bot using discord.js, and im currently setting up a reaction role embed. The bot sends the embed ...
1
vote
1
answer
2k
views
How would I "refresh" a discord embed on discord.js? More info down vv
I am coding a bot on discord.js, and I was wondering how I could make this so that the embed would refresh after the button is pressed? What should happen is the embed's enemyamt value would be ...
1
vote
3
answers
972
views
Discord.js smart help embed
I am trying to make a help embed that creates a new field for every file in my command files folder. It keeps showing an error, and I don't know how to fix it.
Here is my code:
const Discord = require(...
1
vote
1
answer
754
views
How can i send a Pagination-embed with a music list discord.js
I want send in a Pagination-embed with a music list because whan an embed is lower at 1024 letters it doesn't send.
I want send in many pages (4musics max per pages)
Sorry for my english, i'm french......
1
vote
1
answer
1k
views
TypeError: Cannot read property 'includes' of null
My discord bot was working fine and working exactly how I wanted it to. But now when I run the bot, it runs for a couple of minutes and then crashes with this error
if (embed.title.includes("Raid&...
1
vote
1
answer
699
views
Discord.js bot not loading image urls in MessageEmbeds(), was previously
So one of my bots has a majority of it's commands contain imagery via the Discord.MessageEmbed() function, which has worked since I first tried it. Now, however, out of nowhere, the images no longer ...
1
vote
1
answer
884
views
How to save richEmbed to file using FS in discord.js?
I created a unpurge feature on my discord bot, where it recovers the last bulk purged messages by just sending them to the general channel. In order to do this, I need the bot to save the richEmbed (...
1
vote
1
answer
2k
views
Inline embed field doesn't work
After having done an update of Node.js, embeds don't work correctly now...
I tried to reinstall node.js and discord.js but nothing happened. I also tried to rewrite the code but it's the same thing, ...
0
votes
2
answers
7k
views
Discord.js Bot embed message isn't showing bot avatar
Hi I'm creating my own discord bot and I want to use the command !botinfo
When I use that command it has to show a embed message in my channel.
So far everything works expect it doesn't show my ...
0
votes
1
answer
3k
views
Discord embed message not working correctly
My discord bot is sending the wrong embed message. Its a hug command, if someone doesn't mention somebody the bot sends an error message in the channel with the following content: Please mention a ...
0
votes
1
answer
6k
views
Creating new discord embed fields with array.length
So I have have an array of names let namelist = ['name1', 'name2', 'name3', 'name4', 'name5']; and i have a for loop that when a user uses the command $list ame it sorts through the array and grabs ...
0
votes
2
answers
867
views
How to update and reply at the same time for an interaction, discord.js?
I'm experiencing an interaction error interaction has already been acknowledged when attempting to update and reply. This is because I already replied to the interaction through update/reply once.
...
0
votes
2
answers
1k
views
Discord.js send messages in order
I have a discord bot that, on command, will send multiple messages to a channel. Some of the messages are images, and they always get sent last.
msg.channel.send({files: ["image.png"]});
for ...
0
votes
1
answer
35k
views
Mentioning people/roles inside an embed (discord.js)
I am trying to create for my discord server a set-roles channel, where every role is explained.
I want my bot to say everything inside an embed, so noone would be tagged if their role is mentioned ...
0
votes
1
answer
137
views
RichEmbed is not defined error how to fix
so, i have learn how to make a discord bot from a youtube channel which called "CodeLyon" and there is the error:enter image description here
do someone know how to fix it? (I searched a ...
0
votes
1
answer
6k
views
Using Discord.js to check the url of an image in an embed
The idea
What I seek to do, is upon a message being sent, if that message is an embed, I want my bot to check the image in that embed (if there is one) for it's url, and if the url matches a specific ...
0
votes
1
answer
462
views
Custom Discord bot already made - How do I have my bot return an Embed with a Hypertext link included?
I am very new to .js and I'm wanting to add a command to my custom bot called /betslip (link) which will then have the bot return an Embed with the betslip link in such an example as below:
Input: /...
0
votes
1
answer
960
views
Discord.js v14 button for browsing embed message pages aren't working
I'm trying to figure out how to make buttons work in embed message to browse the page with the addresses from the file. I'm able to post the embed message with the addresses and landing on first page, ...
0
votes
1
answer
817
views
Putting a person that send embed in footer discord.js 14
I'm learning coding and wanted to make a discord bot with tutorial and it went great but now he puts a message.author.tag in footer but
When I try to add message.author.tag to the embed footer, I get ...
0
votes
1
answer
895
views
User image to Discord Embed
I want the image that a user sends to be fetched and put into an embed that the bot will then send. As the image must be a url and the person sends an image, I don't know how I can transform this ...
0
votes
1
answer
5k
views
Discord.js Table with embed maybe?
I just want to make a table according to this. But could not find any code like this. Anyone know?
0
votes
3
answers
10k
views
How could I mention a user in an embed?
I'm currently having an issue where I'm unable to ping people in embeds. I've searched up solutions online, but none of them are working. Here's my code, thanks.
else if (command === 'post') {
...
0
votes
1
answer
2k
views
Cannot send embed and components discord.js v13
I can't send a button with my embed on discord.js v13, the bot only send the embed and not the button. I got an error "Invalid from body" but i don't know what i have to do?
Here is my code :...
0
votes
2
answers
339
views
Type error; 'MessageEmbed" of undefined in discord.js
I cant understand why i am getting the error:
TypeError: Cannot read property 'MessageEmbed' of undefined
Here is my code:
module.exports = {
name: 'help',
description: "this is the help command&...
0
votes
1
answer
208
views
How to embed a message in a command base
I am using WOK's advanced command handler and I just want the final message that will be returned to be an embed.
I am working on a specific test command where I type the prefix (for example !) when I ...
0
votes
1
answer
1k
views
Making a welcome message an embed on discord.js
I have connected MongoDB to my discord.js code and have made a setwelcome command as per-server data so that each server can customize their own welcome message. Everything works great, I just want to ...
0
votes
1
answer
347
views
what is wrong with the code i found to include an image in a discord.js bot?
I'm trying to send an image file through a discord.js bot. (yes I'm using if/else still, it's my first bot so I'm starting simple)
This is the code I have at the moment, but it's just not working. ...