Skip to content
This repository was archived by the owner on Apr 27, 2024. It is now read-only.

Conversation

@tjrgg
Copy link
Contributor

@tjrgg tjrgg commented Jul 27, 2020

  • Adds missing lastPinTimestamp property to DMChannel.
  • Updates lastPinTimestamp when CHANNEL_PINS_UPDATE action runs.

const channel = guild ? guild.channels.get(data.d.channel_id) : this.client.dms.get(data.d.channel_id);
if (!channel || !isTextBasedChannel(channel)) return;

channel.lastPinTimestamp = data.d.last_pin_timestamp ?? null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can last_pin_timestamp ever be undefined? If so, you should guard the set with the isSet util from this library.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants