Closed DIPx69 closed 3 weeks ago
We can't add something, which does not exists anymore:
The difference between the old interaction
info:
And the new
interaction_metadata
info:
is that:
user
instead of member
name
of the command is missingI'm a bit confused tho why we would have had that before, since interaction infos on messages never had the real interaction saved, that'd have been a privacy concern to be honest (api side). I can imagine that we monkey-patched the last interaction data on it, but from discord side we never receive interaction.data on a message object.
Maybe I'm still too tired, but it seems like something we can't do?
@plun1331 / @NeloBlivion could you double check for me
I believe what they mean is that the old MessageInteraction
class assigned self.data = data
so you could access the raw data from Discord; the new InteractionMetadata
class that replaced it does not do this (as an aside, I honestly think every Discord Model should assign the raw data as an attribute so that users can freely make use of it if necessary.)
Ah fair, well we can leave that open then, but definitely low prio since it's nothing spec related
Indeed, pretty easy fix and you can still access the old message.interaction.data
(or you should be able to? it's right above message.interaction_metadata)
Indeed, pretty easy fix and you can still access the old
message.interaction.data
(or you should be able to? it's right above message.interaction_metadata)
message.interaction
is deprecated and could get removed, thus we would rather not rely on it
Ah of course, but in the short term they can still make use of it
Ah of course, but in the short term they can still make use of it
I am using version 2.6 with the changes in the code, and my codebase is working fine. I hope these issue will be patched in the next update. Thanks for helping me
Indeed, pretty easy fix and you can still access the old
message.interaction.data
(or you should be able to? it's right above message.interaction_metadata)
message.interaction
is deprecated and could get removed, thus we would rather not rely on it
I can still use _interaction
without any deprecated warnings
Don't think we included a warning in code because it'd trigger on every message without any user involvement, it's been marked as deprecated in the docs though (or maybe we could make it a property?)
Don't think we included a warning in code because it'd trigger on every message without any user involvement, it's been marked as deprecated in the docs though (or maybe we could make it a property?)
As I know MessageInteraction
class will be removed from the codebase in the next update.
I am using version 2.6 with the changes in the code, and my codebase is working fine. I hope these issue will be patched in the next update. Thanks for helping me
It's not on our prio list so no promises.
What would be interesting is what property you want to get
As I know
MessageInteraction
class will be removed from the codebase in the next update.
Most likely
I am using version 2.6 with the changes in the code, and my codebase is working fine. I hope these issue will be patched in the next update. Thanks for helping me
It's not on our prio list so no promises.
What would be interesting is what property you want to get
name
name
This is a property of a deprecated and soon to be removed field by discord. Try finding another solution, we won't support specifically that, as outlined in my first response here
Summary
In previous versions, raw interaction data could be accessed using message.interaction.data. However, since the 2.6 update, this method has changed
What is the feature request for?
The core library
The Problem
The issue is that since the 2.6 update, we can no longer access raw interaction data using
message.interaction.data
as we did previouslyThe Ideal Solution
interactions.py
, within theInteractionMetadata
class, adddata
to the__slots__
.self.data = data
within the class.This modification allows you to access the raw interaction data as
message.interaction.data
, similar to the previous implementation before the 2.6 updateThe Current Solution
No response
Additional Context
No response