Skip to content

Conversation

@almostSouji
Copy link
Member

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

MessageEditOptions#embed allows a MessageEmbed structure to be passed. This is currently not reflected in documentation or typings which only allow the raw embed data (type: MessageEmbedOptions).

This PR adds the typings and documentation to rectify this.

import { MessageEmbed, MessageEditOptions } from 'discord.js';
const data: MessageEditOptions = {};
data.embed = new MessageEmbed();
(property) MessageEditOptions.embed?: MessageEmbedOptions | null | undefined
Type 'MessageEmbed' is not assignable to type 'MessageEmbedOptions'.
  Types of property 'timestamp' are incompatible.
    Type 'number | null' is not assignable to type 'number | Date | undefined'.
      Type 'null' is not assignable to type 'number | Date | undefined'.ts(2322)

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.

@iCrawl iCrawl merged commit bbfc715 into discordjs:master Aug 11, 2020
@almostSouji almostSouji deleted the typings-messageeditoptions-embed branch April 6, 2021 20:20
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.

6 participants