Resolving merge conflict (#8)

stuff
This commit is contained in:
Nicolas 2022-07-03 17:27:56 -03:00 committed by GitHub
parent b7ff327a7c
commit 202c020171
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,7 +112,18 @@ export class Message implements Model {
}; };
} }
// webhook handling
if (data.author && data.author.discriminator === "0000") {
this.webhook = {
id: data.author.id,
username: data.author.username,
discriminator: data.author.discriminator,
avatar: data.author.avatar ? iconHashToBigInt(data.author.avatar) : undefined,
};
}
// user is always null on MessageCreate and its replaced with author // user is always null on MessageCreate and its replaced with author
if (data.guild_id && data.member && !this.isWebhookMessage()) { if (data.guild_id && data.member && !this.isWebhookMessage()) {
this.member = new Member(session, { ...data.member, user: data.author }, data.guild_id); this.member = new Member(session, { ...data.member, user: data.author }, data.guild_id);
} }
@ -178,6 +189,7 @@ export class Message implements Model {
return this.editedTimestamp; return this.editedTimestamp;
} }
get url() { get url() {
return `https://discord.com/channels/${this.guildId ?? "@me"}/${this.channelId}/${this.id}`; return `https://discord.com/channels/${this.guildId ?? "@me"}/${this.channelId}/${this.id}`;
} }