Comments (7)
Please provide code example for reproduction steps, I have no idea what getEmbeds
method you're talking about, nor where the message comes from
If I had to guess, this is a message received event, in which case the embed resolution is done asynchronously (on Discord's side), as you may have noticed that embeds sometimes do take time to appear on Discord itself, it is therefore not a JDA issue.
There's also an event that fires when an embed get resolved, see MessageEmbedEvent
from jda.
Sorry, I'm indeed talking about the message received event. I've also just found the line where they're parsed so I was about to say that it seems it's a problem on Discord's side:
Is there a way to check whether a message has any embeds, even if they aren't resolved yet? I'm constrained by needing the entire contents of a message and any embeds it may have at a singular point in time, so if I could check whether a message has embeds and then wait for them I would like to know about it. From what I've read in the wiki and javadocs so far, it doesn't seem like it.
from jda.
There's no way to determine if a message will have embeds generated by links, only Discord's embed generator can do that.
You can check if a message has links, you should be able to find a few regex's online
Telling why you need to see generated embeds would also help
from jda.
(I've updated the issue with the relevant code now)
My usecase is synchronizing Discord chat with Minecraft chat, where I want to send the Discord messages into the Minecraft chat after formatting them with Minecraft's Component system. In the code example given in the issue you can see where I access the embeds and format them.
from jda.
Also, not every link leads to an embed, so checking whether there's a link and then waiting for the embeds event may just deadlock the program if done without a timeout. I want it to be as responsive as possible.
from jda.
If there's no way to edit a MC message to include the embeds later, then you can't
from jda.
Alright, there isn't. This answers my question. Thanks for your time.
from jda.
Related Issues (20)
- First GuildMemberRoleAddEvent or GuildMemberRoleRemoveEvent does not fire HOT 6
- event.getTarget().getMember() returns null in onMessageContextInteraction HOT 2
- Audio WebsSocket Issue HOT 3
- FlatMapRestAction not checking the condition predicate when using RestAction#submit() HOT 1
- Discord JDA loading SlashCommands HOT 1
- event does not send response (GuildMemberJoinEvent)
- ClassCastException/Failed to parse JSON HOT 5
- Can't register Guild command HOT 1
- Modify Bot's Browser or Device HOT 2
- Polls HOT 6
- Make JDA bubble up websocket crashes as ExceptionEvent HOT 1
- add errorresponse 50178 The user account must first be verified HOT 2
- .
- Bot is unable to stream audio on stage in certain scenarios HOT 4
- Commands.slash name on russian HOT 2
- Exception in WS read thread: RSV1 bit of a frame is set unexpectedly HOT 12
- ErrorResponse USER_MUST_BE_VERIFIED Error HOT 3
- Manage role didn't work and also not throw any error HOT 4
- ClassNotFoundException: net.dv8tion.jda.api.entities.GuildChannel HOT 2
- Bot can't delete voice channel even with MANAGE_CHANNEL HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jda.