discord-jadx/app/src/main/java/com/discord/models/message/Message.java

866 lines
35 KiB
Java

package com.discord.models.message;
import a0.a.a.b;
import c.d.b.a.a;
import com.discord.api.application.Application;
import com.discord.api.botuikit.Component;
import com.discord.api.channel.Channel;
import com.discord.api.interaction.Interaction;
import com.discord.api.message.LocalAttachment;
import com.discord.api.message.MessageReference;
import com.discord.api.message.activity.MessageActivity;
import com.discord.api.message.activity.MessageActivityType;
import com.discord.api.message.allowedmentions.MessageAllowedMentions;
import com.discord.api.message.attachment.MessageAttachment;
import com.discord.api.message.call.MessageCall;
import com.discord.api.message.embed.MessageEmbed;
import com.discord.api.message.reaction.MessageReaction;
import com.discord.api.sticker.Sticker;
import com.discord.api.sticker.StickerPartial;
import com.discord.api.user.User;
import com.discord.api.utcdatetime.UtcDateTime;
import d0.g;
import d0.g0.w;
import d0.t.h0;
import d0.z.d.m;
import java.util.List;
import java.util.Map;
import kotlin.Lazy;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* compiled from: Message.kt */
public final class Message {
public static final Companion Companion = new Companion(null);
private static final Map<String, MessageReaction> EMPTY_REACTIONS = h0.emptyMap();
private final MessageActivity activity;
private final MessageAllowedMentions allowedMentions;
private final Application application;
private final Long applicationId;
private final List<MessageAttachment> attachments;
private final User author;
private final MessageCall call;
private final long channelId;
private final List<Component> components;
private final String content;
private final UtcDateTime editedTimestamp;
private final List<MessageEmbed> embeds;
private final Long flags;
private final Long guildId;
private final transient boolean hasLocalUploads;
private final Boolean hit;
/* renamed from: id reason: collision with root package name */
private final long f2058id;
private final Long initialAttemptTimestamp;
private final Interaction interaction;
private final Long lastManualAttemptTimestamp;
private final List<LocalAttachment> localAttachments;
private final Boolean mentionEveryone;
private final List<Long> mentionRoles;
private final List<User> mentions;
private final MessageReference messageReference;
private final String nonce;
private final Integer numRetries;
private final Boolean pinned;
private final List<MessageReaction> reactions;
private final Lazy reactionsMap$delegate;
private final com.discord.api.message.Message referencedMessage;
private final List<StickerPartial> stickerItems;
private final List<Sticker> stickers;
private final Channel thread;
private final UtcDateTime timestamp;
private final Boolean tts;
private final Integer type;
private final Long webhookId;
/* compiled from: Message.kt */
public static final class Companion {
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
/* JADX DEBUG: Multi-variable search result rejected for r34v0, resolved type: java.util.List<? extends com.discord.api.botuikit.Component> */
/* JADX WARN: Multi-variable type inference failed */
public Message(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List<User> list, List<Long> list2, List<MessageAttachment> list3, List<MessageEmbed> list4, List<MessageReaction> list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List<Sticker> list6, List<StickerPartial> list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List<? extends Component> list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List<LocalAttachment> list9) {
this.f2058id = j;
this.channelId = j2;
this.guildId = l;
this.author = user;
this.content = str;
this.timestamp = utcDateTime;
this.editedTimestamp = utcDateTime2;
this.tts = bool;
this.mentionEveryone = bool2;
this.mentions = list;
this.mentionRoles = list2;
this.attachments = list3;
this.embeds = list4;
this.reactions = list5;
this.nonce = str2;
this.pinned = bool3;
this.webhookId = l2;
this.type = num;
this.activity = messageActivity;
this.application = application;
this.applicationId = l3;
this.messageReference = messageReference;
this.flags = l4;
this.stickers = list6;
this.stickerItems = list7;
this.referencedMessage = message;
this.interaction = interaction;
this.thread = channel;
this.components = list8;
this.call = messageCall;
this.hit = bool4;
this.hasLocalUploads = z2;
this.allowedMentions = messageAllowedMentions;
this.numRetries = num2;
this.lastManualAttemptTimestamp = l5;
this.initialAttemptTimestamp = l6;
this.localAttachments = list9;
this.reactionsMap$delegate = g.lazy(new Message$reactionsMap$2(this));
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public /* synthetic */ Message(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List list, List list2, List list3, List list4, List list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List list6, List list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List list9, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this(j, j2, (i & 4) != 0 ? null : l, (i & 8) != 0 ? null : user, (i & 16) != 0 ? null : str, (i & 32) != 0 ? null : utcDateTime, (i & 64) != 0 ? null : utcDateTime2, (i & 128) != 0 ? null : bool, (i & 256) != 0 ? null : bool2, (i & 512) != 0 ? null : list, (i & 1024) != 0 ? null : list2, (i & 2048) != 0 ? null : list3, (i & 4096) != 0 ? null : list4, (i & 8192) != 0 ? null : list5, (i & 16384) != 0 ? null : str2, (32768 & i) != 0 ? null : bool3, (65536 & i) != 0 ? null : l2, (131072 & i) != 0 ? null : num, (262144 & i) != 0 ? null : messageActivity, (524288 & i) != 0 ? null : application, (1048576 & i) != 0 ? null : l3, (2097152 & i) != 0 ? null : messageReference, (4194304 & i) != 0 ? null : l4, (8388608 & i) != 0 ? null : list6, (16777216 & i) != 0 ? null : list7, (33554432 & i) != 0 ? null : message, (67108864 & i) != 0 ? null : interaction, (134217728 & i) != 0 ? null : channel, (268435456 & i) != 0 ? null : list8, (536870912 & i) != 0 ? null : messageCall, (1073741824 & i) != 0 ? null : bool4, (i & Integer.MIN_VALUE) != 0 ? false : z2, (i2 & 1) != 0 ? null : messageAllowedMentions, (i2 & 2) != 0 ? null : num2, (i2 & 4) != 0 ? null : l5, (i2 & 8) != 0 ? null : l6, (i2 & 16) != 0 ? null : list9);
}
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
public Message(com.discord.api.message.Message message) {
this(message.o(), message.g(), message.m(), message.e(), message.i(), message.C(), message.j(), message.D(), message.r(), message.t(), message.s(), message.d(), message.k(), message.x(), message.v(), message.w(), message.F(), message.E(), message.a(), message.b(), message.c(), message.u(), message.l(), message.A(), message.z(), message.y(), message.p(), message.B(), message.h(), message.f(), message.n(), false, null, null, null, null, null, Integer.MIN_VALUE, 31, null);
m.checkNotNullParameter(message, "message");
}
public static final /* synthetic */ Map access$getEMPTY_REACTIONS$cp() {
return EMPTY_REACTIONS;
}
public static /* synthetic */ Message copy$default(Message message, long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List list, List list2, List list3, List list4, List list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List list6, List list7, com.discord.api.message.Message message2, Interaction interaction, Channel channel, List list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List list9, int i, int i2, Object obj) {
return message.copy((i & 1) != 0 ? message.f2058id : j, (i & 2) != 0 ? message.channelId : j2, (i & 4) != 0 ? message.guildId : l, (i & 8) != 0 ? message.author : user, (i & 16) != 0 ? message.content : str, (i & 32) != 0 ? message.timestamp : utcDateTime, (i & 64) != 0 ? message.editedTimestamp : utcDateTime2, (i & 128) != 0 ? message.tts : bool, (i & 256) != 0 ? message.mentionEveryone : bool2, (i & 512) != 0 ? message.mentions : list, (i & 1024) != 0 ? message.mentionRoles : list2, (i & 2048) != 0 ? message.attachments : list3, (i & 4096) != 0 ? message.embeds : list4, (i & 8192) != 0 ? message.reactions : list5, (i & 16384) != 0 ? message.nonce : str2, (i & 32768) != 0 ? message.pinned : bool3, (i & 65536) != 0 ? message.webhookId : l2, (i & 131072) != 0 ? message.type : num, (i & 262144) != 0 ? message.activity : messageActivity, (i & 524288) != 0 ? message.application : application, (i & 1048576) != 0 ? message.applicationId : l3, (i & 2097152) != 0 ? message.messageReference : messageReference, (i & 4194304) != 0 ? message.flags : l4, (i & 8388608) != 0 ? message.stickers : list6, (i & 16777216) != 0 ? message.stickerItems : list7, (i & 33554432) != 0 ? message.referencedMessage : message2, (i & 67108864) != 0 ? message.interaction : interaction, (i & 134217728) != 0 ? message.thread : channel, (i & 268435456) != 0 ? message.components : list8, (i & 536870912) != 0 ? message.call : messageCall, (i & 1073741824) != 0 ? message.hit : bool4, (i & Integer.MIN_VALUE) != 0 ? message.hasLocalUploads : z2, (i2 & 1) != 0 ? message.allowedMentions : messageAllowedMentions, (i2 & 2) != 0 ? message.numRetries : num2, (i2 & 4) != 0 ? message.lastManualAttemptTimestamp : l5, (i2 & 8) != 0 ? message.initialAttemptTimestamp : l6, (i2 & 16) != 0 ? message.localAttachments : list9);
}
public final boolean canResend() {
Integer num = this.type;
return num != null && num.intValue() == -2;
}
public final long component1() {
return this.f2058id;
}
public final List<User> component10() {
return this.mentions;
}
public final List<Long> component11() {
return this.mentionRoles;
}
public final List<MessageAttachment> component12() {
return this.attachments;
}
public final List<MessageEmbed> component13() {
return this.embeds;
}
public final List<MessageReaction> component14() {
return this.reactions;
}
public final String component15() {
return this.nonce;
}
public final Boolean component16() {
return this.pinned;
}
public final Long component17() {
return this.webhookId;
}
public final Integer component18() {
return this.type;
}
public final MessageActivity component19() {
return this.activity;
}
public final long component2() {
return this.channelId;
}
public final Application component20() {
return this.application;
}
public final Long component21() {
return this.applicationId;
}
public final MessageReference component22() {
return this.messageReference;
}
public final Long component23() {
return this.flags;
}
public final List<Sticker> component24() {
return this.stickers;
}
public final List<StickerPartial> component25() {
return this.stickerItems;
}
public final com.discord.api.message.Message component26() {
return this.referencedMessage;
}
public final Interaction component27() {
return this.interaction;
}
public final Channel component28() {
return this.thread;
}
public final List<Component> component29() {
return this.components;
}
public final Long component3() {
return this.guildId;
}
public final MessageCall component30() {
return this.call;
}
public final Boolean component31() {
return this.hit;
}
public final boolean component32() {
return this.hasLocalUploads;
}
public final MessageAllowedMentions component33() {
return this.allowedMentions;
}
public final Integer component34() {
return this.numRetries;
}
public final Long component35() {
return this.lastManualAttemptTimestamp;
}
public final Long component36() {
return this.initialAttemptTimestamp;
}
public final List<LocalAttachment> component37() {
return this.localAttachments;
}
public final User component4() {
return this.author;
}
public final String component5() {
return this.content;
}
public final UtcDateTime component6() {
return this.timestamp;
}
public final UtcDateTime component7() {
return this.editedTimestamp;
}
public final Boolean component8() {
return this.tts;
}
public final Boolean component9() {
return this.mentionEveryone;
}
public final Message copy(long j, long j2, Long l, User user, String str, UtcDateTime utcDateTime, UtcDateTime utcDateTime2, Boolean bool, Boolean bool2, List<User> list, List<Long> list2, List<MessageAttachment> list3, List<MessageEmbed> list4, List<MessageReaction> list5, String str2, Boolean bool3, Long l2, Integer num, MessageActivity messageActivity, Application application, Long l3, MessageReference messageReference, Long l4, List<Sticker> list6, List<StickerPartial> list7, com.discord.api.message.Message message, Interaction interaction, Channel channel, List<? extends Component> list8, MessageCall messageCall, Boolean bool4, boolean z2, MessageAllowedMentions messageAllowedMentions, Integer num2, Long l5, Long l6, List<LocalAttachment> list9) {
return new Message(j, j2, l, user, str, utcDateTime, utcDateTime2, bool, bool2, list, list2, list3, list4, list5, str2, bool3, l2, num, messageActivity, application, l3, messageReference, l4, list6, list7, message, interaction, channel, list8, messageCall, bool4, z2, messageAllowedMentions, num2, l5, l6, list9);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Message)) {
return false;
}
Message message = (Message) obj;
return this.f2058id == message.f2058id && this.channelId == message.channelId && m.areEqual(this.guildId, message.guildId) && m.areEqual(this.author, message.author) && m.areEqual(this.content, message.content) && m.areEqual(this.timestamp, message.timestamp) && m.areEqual(this.editedTimestamp, message.editedTimestamp) && m.areEqual(this.tts, message.tts) && m.areEqual(this.mentionEveryone, message.mentionEveryone) && m.areEqual(this.mentions, message.mentions) && m.areEqual(this.mentionRoles, message.mentionRoles) && m.areEqual(this.attachments, message.attachments) && m.areEqual(this.embeds, message.embeds) && m.areEqual(this.reactions, message.reactions) && m.areEqual(this.nonce, message.nonce) && m.areEqual(this.pinned, message.pinned) && m.areEqual(this.webhookId, message.webhookId) && m.areEqual(this.type, message.type) && m.areEqual(this.activity, message.activity) && m.areEqual(this.application, message.application) && m.areEqual(this.applicationId, message.applicationId) && m.areEqual(this.messageReference, message.messageReference) && m.areEqual(this.flags, message.flags) && m.areEqual(this.stickers, message.stickers) && m.areEqual(this.stickerItems, message.stickerItems) && m.areEqual(this.referencedMessage, message.referencedMessage) && m.areEqual(this.interaction, message.interaction) && m.areEqual(this.thread, message.thread) && m.areEqual(this.components, message.components) && m.areEqual(this.call, message.call) && m.areEqual(this.hit, message.hit) && this.hasLocalUploads == message.hasLocalUploads && m.areEqual(this.allowedMentions, message.allowedMentions) && m.areEqual(this.numRetries, message.numRetries) && m.areEqual(this.lastManualAttemptTimestamp, message.lastManualAttemptTimestamp) && m.areEqual(this.initialAttemptTimestamp, message.initialAttemptTimestamp) && m.areEqual(this.localAttachments, message.localAttachments);
}
public final MessageActivity getActivity() {
return this.activity;
}
public final MessageAllowedMentions getAllowedMentions() {
return this.allowedMentions;
}
public final Application getApplication() {
return this.application;
}
public final Long getApplicationId() {
return this.applicationId;
}
public final List<MessageAttachment> getAttachments() {
return this.attachments;
}
public final User getAuthor() {
return this.author;
}
public final MessageCall getCall() {
return this.call;
}
public final long getCallDuration() {
UtcDateTime a;
UtcDateTime utcDateTime;
MessageCall messageCall = this.call;
if (messageCall == null || (a = messageCall.a()) == null || (utcDateTime = this.timestamp) == null) {
return 0;
}
return a.f() - utcDateTime.f();
}
public final long getChannelId() {
return this.channelId;
}
public final List<Component> getComponents() {
return this.components;
}
public final String getContent() {
return this.content;
}
public final UtcDateTime getEditedTimestamp() {
return this.editedTimestamp;
}
public final List<MessageEmbed> getEmbeds() {
return this.embeds;
}
public final Long getFlags() {
return this.flags;
}
public final Long getGuildId() {
return this.guildId;
}
public final boolean getHasLocalUploads() {
return this.hasLocalUploads;
}
public final Boolean getHit() {
return this.hit;
}
public final long getId() {
return this.f2058id;
}
public final Long getInitialAttemptTimestamp() {
return this.initialAttemptTimestamp;
}
public final Interaction getInteraction() {
return this.interaction;
}
public final Long getLastManualAttemptTimestamp() {
return this.lastManualAttemptTimestamp;
}
public final List<LocalAttachment> getLocalAttachments() {
return this.localAttachments;
}
public final Boolean getMentionEveryone() {
return this.mentionEveryone;
}
public final List<Long> getMentionRoles() {
return this.mentionRoles;
}
public final List<User> getMentions() {
return this.mentions;
}
public final MessageReference getMessageReference() {
return this.messageReference;
}
public final String getNonce() {
return this.nonce;
}
public final Integer getNumRetries() {
return this.numRetries;
}
public final Boolean getPinned() {
return this.pinned;
}
public final List<MessageReaction> getReactions() {
return this.reactions;
}
public final Map<String, MessageReaction> getReactionsMap() {
return (Map) this.reactionsMap$delegate.getValue();
}
public final com.discord.api.message.Message getReferencedMessage() {
return this.referencedMessage;
}
public final List<StickerPartial> getStickerItems() {
return this.stickerItems;
}
public final List<Sticker> getStickers() {
return this.stickers;
}
public final Channel getThread() {
return this.thread;
}
public final UtcDateTime getTimestamp() {
return this.timestamp;
}
public final Boolean getTts() {
return this.tts;
}
public final Integer getType() {
return this.type;
}
public final Long getWebhookId() {
return this.webhookId;
}
public final boolean hasAttachments() {
List<MessageAttachment> list = this.attachments;
return !(list == null || list.isEmpty());
}
public final boolean hasEmbeds() {
List<MessageEmbed> list = this.embeds;
return !(list == null || list.isEmpty());
}
public final boolean hasFlag(long j) {
Long l = this.flags;
return ((l != null ? l.longValue() : 0) & j) == j;
}
public final boolean hasStickers() {
List<Sticker> list = this.stickers;
if (list == null || list.isEmpty()) {
List<StickerPartial> list2 = this.stickerItems;
if (list2 == null || list2.isEmpty()) {
return false;
}
}
return true;
}
public final boolean hasThread() {
return hasFlag(32);
}
public int hashCode() {
int a = (b.a(this.channelId) + (b.a(this.f2058id) * 31)) * 31;
Long l = this.guildId;
int i = 0;
int hashCode = (a + (l != null ? l.hashCode() : 0)) * 31;
User user = this.author;
int hashCode2 = (hashCode + (user != null ? user.hashCode() : 0)) * 31;
String str = this.content;
int hashCode3 = (hashCode2 + (str != null ? str.hashCode() : 0)) * 31;
UtcDateTime utcDateTime = this.timestamp;
int hashCode4 = (hashCode3 + (utcDateTime != null ? utcDateTime.hashCode() : 0)) * 31;
UtcDateTime utcDateTime2 = this.editedTimestamp;
int hashCode5 = (hashCode4 + (utcDateTime2 != null ? utcDateTime2.hashCode() : 0)) * 31;
Boolean bool = this.tts;
int hashCode6 = (hashCode5 + (bool != null ? bool.hashCode() : 0)) * 31;
Boolean bool2 = this.mentionEveryone;
int hashCode7 = (hashCode6 + (bool2 != null ? bool2.hashCode() : 0)) * 31;
List<User> list = this.mentions;
int hashCode8 = (hashCode7 + (list != null ? list.hashCode() : 0)) * 31;
List<Long> list2 = this.mentionRoles;
int hashCode9 = (hashCode8 + (list2 != null ? list2.hashCode() : 0)) * 31;
List<MessageAttachment> list3 = this.attachments;
int hashCode10 = (hashCode9 + (list3 != null ? list3.hashCode() : 0)) * 31;
List<MessageEmbed> list4 = this.embeds;
int hashCode11 = (hashCode10 + (list4 != null ? list4.hashCode() : 0)) * 31;
List<MessageReaction> list5 = this.reactions;
int hashCode12 = (hashCode11 + (list5 != null ? list5.hashCode() : 0)) * 31;
String str2 = this.nonce;
int hashCode13 = (hashCode12 + (str2 != null ? str2.hashCode() : 0)) * 31;
Boolean bool3 = this.pinned;
int hashCode14 = (hashCode13 + (bool3 != null ? bool3.hashCode() : 0)) * 31;
Long l2 = this.webhookId;
int hashCode15 = (hashCode14 + (l2 != null ? l2.hashCode() : 0)) * 31;
Integer num = this.type;
int hashCode16 = (hashCode15 + (num != null ? num.hashCode() : 0)) * 31;
MessageActivity messageActivity = this.activity;
int hashCode17 = (hashCode16 + (messageActivity != null ? messageActivity.hashCode() : 0)) * 31;
Application application = this.application;
int hashCode18 = (hashCode17 + (application != null ? application.hashCode() : 0)) * 31;
Long l3 = this.applicationId;
int hashCode19 = (hashCode18 + (l3 != null ? l3.hashCode() : 0)) * 31;
MessageReference messageReference = this.messageReference;
int hashCode20 = (hashCode19 + (messageReference != null ? messageReference.hashCode() : 0)) * 31;
Long l4 = this.flags;
int hashCode21 = (hashCode20 + (l4 != null ? l4.hashCode() : 0)) * 31;
List<Sticker> list6 = this.stickers;
int hashCode22 = (hashCode21 + (list6 != null ? list6.hashCode() : 0)) * 31;
List<StickerPartial> list7 = this.stickerItems;
int hashCode23 = (hashCode22 + (list7 != null ? list7.hashCode() : 0)) * 31;
com.discord.api.message.Message message = this.referencedMessage;
int hashCode24 = (hashCode23 + (message != null ? message.hashCode() : 0)) * 31;
Interaction interaction = this.interaction;
int hashCode25 = (hashCode24 + (interaction != null ? interaction.hashCode() : 0)) * 31;
Channel channel = this.thread;
int hashCode26 = (hashCode25 + (channel != null ? channel.hashCode() : 0)) * 31;
List<Component> list8 = this.components;
int hashCode27 = (hashCode26 + (list8 != null ? list8.hashCode() : 0)) * 31;
MessageCall messageCall = this.call;
int hashCode28 = (hashCode27 + (messageCall != null ? messageCall.hashCode() : 0)) * 31;
Boolean bool4 = this.hit;
int hashCode29 = (hashCode28 + (bool4 != null ? bool4.hashCode() : 0)) * 31;
boolean z2 = this.hasLocalUploads;
if (z2) {
z2 = true;
}
int i2 = z2 ? 1 : 0;
int i3 = z2 ? 1 : 0;
int i4 = z2 ? 1 : 0;
int i5 = (hashCode29 + i2) * 31;
MessageAllowedMentions messageAllowedMentions = this.allowedMentions;
int hashCode30 = (i5 + (messageAllowedMentions != null ? messageAllowedMentions.hashCode() : 0)) * 31;
Integer num2 = this.numRetries;
int hashCode31 = (hashCode30 + (num2 != null ? num2.hashCode() : 0)) * 31;
Long l5 = this.lastManualAttemptTimestamp;
int hashCode32 = (hashCode31 + (l5 != null ? l5.hashCode() : 0)) * 31;
Long l6 = this.initialAttemptTimestamp;
int hashCode33 = (hashCode32 + (l6 != null ? l6.hashCode() : 0)) * 31;
List<LocalAttachment> list9 = this.localAttachments;
if (list9 != null) {
i = list9.hashCode();
}
return hashCode33 + i;
}
public final boolean isCrosspost() {
return hasFlag(2);
}
public final boolean isCrossposted() {
return hasFlag(1);
}
public final boolean isEmbeddedMessageType() {
Integer num;
Integer num2 = this.type;
return (num2 != null && num2.intValue() == 19) || ((num = this.type) != null && num.intValue() == 21);
}
public final boolean isEphemeralMessage() {
return hasFlag(64);
}
public final boolean isFailed() {
Integer num;
Integer num2;
Integer num3 = this.type;
return (num3 != null && num3.intValue() == -3) || ((num = this.type) != null && num.intValue() == -2) || ((num2 = this.type) != null && num2.intValue() == -4);
}
public final boolean isInteraction() {
Integer num;
Integer num2 = this.type;
return (num2 != null && num2.intValue() == -5) || ((num = this.type) != null && num.intValue() == -4) || this.interaction != null;
}
public final boolean isLoading() {
return hasFlag(128);
}
public final boolean isLocal() {
Integer num;
Integer num2;
Integer num3 = this.type;
return (num3 != null && num3.intValue() == -1) || ((num = this.type) != null && num.intValue() == -2) || (((num2 = this.type) != null && num2.intValue() == -3) || isLocalApplicationCommand());
}
public final boolean isLocalApplicationCommand() {
Integer num;
Integer num2 = this.type;
return (num2 != null && num2.intValue() == -5) || ((num = this.type) != null && num.intValue() == -4);
}
public final boolean isSourceDeleted() {
return hasFlag(8);
}
public final boolean isSpotifyListeningActivity() {
MessageActivity messageActivity = this.activity;
return messageActivity != null && messageActivity.b() == MessageActivityType.LISTEN && w.contains$default(messageActivity.a(), "spotify", false, 2, null);
}
public final boolean isSystemMessage() {
return !isUserMessage();
}
public final boolean isUrgent() {
return hasFlag(16);
}
public final boolean isUserMessage() {
Integer num;
Integer num2 = this.type;
return (num2 != null && num2.intValue() == 0) || ((num = this.type) != null && num.intValue() == 19);
}
public final boolean isWebhook() {
return this.webhookId != null;
}
public final Message merge(com.discord.api.message.Message message) {
m.checkNotNullParameter(message, "new");
long o = message.o();
long g = message.g() != 0 ? message.g() : this.channelId;
Long m = message.m();
if (m == null) {
m = this.guildId;
}
User e = message.e();
if (e == null) {
e = this.author;
}
String i = message.i();
if (i == null) {
i = this.content;
}
UtcDateTime C = message.C();
if (C == null) {
C = this.timestamp;
}
UtcDateTime j = message.j();
if (j == null) {
j = this.editedTimestamp;
}
List<MessageAttachment> d = message.d();
if (d == null) {
d = this.attachments;
}
List<MessageEmbed> k = message.k();
if (k == null) {
k = this.embeds;
}
Boolean D = message.D();
if (D == null) {
D = this.tts;
}
Boolean r = message.r();
if (r == null) {
r = this.mentionEveryone;
}
List<User> t = message.t();
if (t == null) {
t = this.mentions;
}
List<Long> s2 = message.s();
if (s2 == null) {
s2 = this.mentionRoles;
}
List<MessageReaction> x2 = message.x();
if (x2 == null) {
x2 = this.reactions;
}
String v = message.v();
if (v == null) {
v = this.nonce;
}
Boolean w = message.w();
if (w == null) {
w = this.pinned;
}
Long F = message.F();
if (F == null) {
F = this.webhookId;
}
Integer E = message.E();
if (E == null) {
E = this.type;
}
MessageActivity a = message.a();
if (a == null) {
a = this.activity;
}
Application b = message.b();
if (b == null) {
b = this.application;
}
Long c2 = message.c();
if (c2 == null) {
c2 = this.applicationId;
}
MessageReference u = message.u();
if (u == null) {
u = this.messageReference;
}
Long l = message.l();
if (l == null) {
l = this.flags;
}
List<Sticker> A = message.A();
if (A == null) {
A = this.stickers;
}
List<StickerPartial> z2 = message.z();
if (z2 == null) {
z2 = this.stickerItems;
}
com.discord.api.message.Message y2 = message.y();
if (y2 == null) {
y2 = this.referencedMessage;
}
Interaction p = message.p();
if (p == null) {
p = this.interaction;
}
Channel B = message.B();
if (B == null) {
B = this.thread;
}
List<Component> h = message.h();
if (h == null) {
h = this.components;
}
MessageCall f = message.f();
if (f == null) {
f = this.call;
}
return copy$default(this, o, g, m, e, i, C, j, D, r, t, s2, d, k, x2, v, w, F, E, a, b, c2, u, l, A, z2, y2, p, B, h, f, null, false, null, null, null, null, null, -1073741824, 31, null);
}
public final com.discord.api.message.Message synthesizeApiMessage() {
return new com.discord.api.message.Message(this.f2058id, this.channelId, this.author, this.content, this.timestamp, this.editedTimestamp, this.tts, this.mentionEveryone, this.mentions, this.mentionRoles, this.attachments, this.embeds, this.reactions, this.nonce, this.pinned, this.webhookId, this.type, this.activity, this.application, this.applicationId, this.messageReference, this.flags, this.stickers, this.stickerItems, this.referencedMessage, this.interaction, this.thread, this.components, this.call, this.guildId, null, null, -1073741824);
}
public String toString() {
StringBuilder L = a.L("Message(id=");
L.append(this.f2058id);
L.append(", channelId=");
L.append(this.channelId);
L.append(", guildId=");
L.append(this.guildId);
L.append(", author=");
L.append(this.author);
L.append(", content=");
L.append(this.content);
L.append(", timestamp=");
L.append(this.timestamp);
L.append(", editedTimestamp=");
L.append(this.editedTimestamp);
L.append(", tts=");
L.append(this.tts);
L.append(", mentionEveryone=");
L.append(this.mentionEveryone);
L.append(", mentions=");
L.append(this.mentions);
L.append(", mentionRoles=");
L.append(this.mentionRoles);
L.append(", attachments=");
L.append(this.attachments);
L.append(", embeds=");
L.append(this.embeds);
L.append(", reactions=");
L.append(this.reactions);
L.append(", nonce=");
L.append(this.nonce);
L.append(", pinned=");
L.append(this.pinned);
L.append(", webhookId=");
L.append(this.webhookId);
L.append(", type=");
L.append(this.type);
L.append(", activity=");
L.append(this.activity);
L.append(", application=");
L.append(this.application);
L.append(", applicationId=");
L.append(this.applicationId);
L.append(", messageReference=");
L.append(this.messageReference);
L.append(", flags=");
L.append(this.flags);
L.append(", stickers=");
L.append(this.stickers);
L.append(", stickerItems=");
L.append(this.stickerItems);
L.append(", referencedMessage=");
L.append(this.referencedMessage);
L.append(", interaction=");
L.append(this.interaction);
L.append(", thread=");
L.append(this.thread);
L.append(", components=");
L.append(this.components);
L.append(", call=");
L.append(this.call);
L.append(", hit=");
L.append(this.hit);
L.append(", hasLocalUploads=");
L.append(this.hasLocalUploads);
L.append(", allowedMentions=");
L.append(this.allowedMentions);
L.append(", numRetries=");
L.append(this.numRetries);
L.append(", lastManualAttemptTimestamp=");
L.append(this.lastManualAttemptTimestamp);
L.append(", initialAttemptTimestamp=");
L.append(this.initialAttemptTimestamp);
L.append(", localAttachments=");
return a.E(L, this.localAttachments, ")");
}
}