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

refactor: removed code and split options #5918

Merged
merged 1 commit into from
Jun 26, 2021

Conversation

kyranet
Copy link
Member

@kyranet kyranet commented Jun 24, 2021

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

🧹 clean-up service here, removing old remnants from old versions of discord.js

⚠️ Removed APIMessage#split
⚠️ Removed MessageEditOptions#code
⚠️ Removed BaseMessageOptions#code
⚠️ Removed BaseMessageOptions#split

  • Why?
    No other method in the entire library does two requests to the same path. This method was an exception for many years, and is something that should always been done by the user.
  • How do I restore this feature?
    You can still use the Util.splitMessage utility, and then with given array, send all the messages as you desire.
    As for code, simply wrap the content into ```js\n${content}```​. We're releasing an utility later in the future too, so you can do codeblock('js', content).

Status and versioning classification:

  • 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
  • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)

typings/index.d.ts Outdated Show resolved Hide resolved
@kyranet kyranet force-pushed the cleanup/remove-code-and-split branch from b704865 to e5c26aa Compare June 24, 2021 22:05
typings/index.ts Outdated Show resolved Hide resolved
Copy link
Member

@SpaceEEC SpaceEEC left a comment

Choose a reason for hiding this comment

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

@kyranet kyranet requested a review from SpaceEEC June 25, 2021 09:58
Co-authored-by: Jan <[email protected]>

BREAKING CHANGE: Removed `APIMessage#split`
BREAKING CHANGE: Removed `MessageEditOptions#code`
BREAKING CHANGE: Removed `BaseMessageOptions#code`
BREAKING CHANGE: Removed `BaseMessageOptions#split`
Copy link
Member

@vladfrangu vladfrangu left a comment

Choose a reason for hiding this comment

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

🧹🧹

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