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)
- Boost Event HOT 2
- member.canInteract() HOT 15
- GuildVoiceUpdateEvent is executed twice HOT 3
- Boost Event HOT 1
- Setting the thread id for a webhook create or update action doesn't work
- Maybe bug, slash command twice HOT 3
- Message delete is not working (Button Interaction) HOT 1
- First slash command registered does not register HOT 2
- Message delete error HOT 2
- Address CVE-2023-3635 HOT 1
- Add an interface that extends IReplyCallback and IModalCallback HOT 1
- Add TextInputInteractionEvent HOT 4
- Voice channel modify event problems HOT 1
- Clearing voice channel status returns internal server error
- canTalk returns true for private thread without permission HOT 2
- Voice connect return RestAction HOT 8
- Button#getLabel() is marked as @Nonnull, but is an optional field in API documentation HOT 3
- First GuildMemberRoleAddEvent or GuildMemberRoleRemoveEvent does not fire HOT 6
- event.getTarget().getMember() returns null in onMessageContextInteraction 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.