Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Webhook): add type property and created* getters #3585

Merged
merged 4 commits into from
Dec 27, 2019

Conversation

SpaceEEC
Copy link
Member

@SpaceEEC SpaceEEC commented Nov 19, 2019

Please describe the changes this PR makes and why it should be merged:

Resolves #3605

This PR adds Webhook#type to distinguish between incoming and channel follower webhooks.
See: discord/discord-api-docs@b36723b

It also adds createdAt and createdTimestamp to Webhook and adds those, as well as url, to the list of applied properties to WebhookClient.

Status

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

Semantic versioning classification:

  • This PR changes the library's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

@SpaceEEC SpaceEEC changed the title feat(Webhook): add created* getters feat(Webhook): add type property and created* getters Nov 19, 2019
Copy link
Contributor

@PyroTechniac PyroTechniac left a comment

Choose a reason for hiding this comment

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

Small nit

typings/index.d.ts Outdated Show resolved Hide resolved
Co-Authored-By: Gryffon Bellish <owenbellish@gmail.com>
@MBR-0001 MBR-0001 mentioned this pull request Nov 30, 2019
1 task
@almostSouji
Copy link
Member

since the linked commit also introduces the documentation for token to be nullable shouldn't that also be incorporated both into the docs as well as typings? ref

@SpaceEEC SpaceEEC merged commit ea76a56 into discordjs:master Dec 27, 2019
@SpaceEEC SpaceEEC deleted the feat/webhook_created branch December 27, 2019 18:27
SpaceEEC added a commit to SpaceEEC/discord.js that referenced this pull request Jan 18, 2020
SpaceEEC added a commit that referenced this pull request Jan 24, 2020
* feat(Webhook): add avatarURL getter

This backports: #3625

* feat(Webhook): add type, createAt, and createdTimestamp

This backports: #3585

* feat(Webhook): add url getter

This backports: #3178

* docs(Webhook): add missing type and readonly tags
samsamson33 pushed a commit to samsamson33/discord.js that referenced this pull request Feb 27, 2020
* feat(Webhook): add created* getters

* feat(Webhook): add type property

* typings(WebhookFields): use primitive string for url getter

Co-Authored-By: Gryffon Bellish <owenbellish@gmail.com>

* fix(Webhook): token can be null

Co-authored-by: Gryffon Bellish <owenbellish@gmail.com>
samsamson33 added a commit to samsamson33/discord.js that referenced this pull request Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webhook#token returns undefined
5 participants