fix(Actions): inject built data by using a symbol (#9204)

This commit is contained in:
Vlad Frangu
2023-03-06 12:31:19 +02:00
committed by GitHub
parent 4bc25c40f5
commit df68520319
3 changed files with 13 additions and 6 deletions

View File

@@ -34,7 +34,7 @@ class GenericAction {
getChannel(data) {
const id = data.channel_id ?? data.id;
return (
data.channel ??
data[this.client.actions.injectedChannel] ??
this.getPayload(
{
id,
@@ -51,7 +51,7 @@ class GenericAction {
getMessage(data, channel, cache) {
const id = data.message_id ?? data.id;
return (
data.message ??
data[this.client.actions.injectedMessage] ??
this.getPayload(
{
id,
@@ -86,7 +86,7 @@ class GenericAction {
getUser(data) {
const id = data.user_id;
return data.user ?? this.getPayload({ id }, this.client.users, id, PartialTypes.USER);
return data[this.client.actions.injectedUser] ?? this.getPayload({ id }, this.client.users, id, PartialTypes.USER);
}
getUserFromMember(data) {