discordjs / website

The discord.js site what else
Other
183 stars 114 forks source link

fix: Show @deprecated descriptions #109

Closed Jiralite closed 3 years ago

Jiralite commented 3 years ago

@deprecated descriptions were being ignored. Only the @deprecated tag would show on the website. This pull request reveals the descriptions of this tag in a warn-like format.

Before ```JavaScript /** * Emitted when an interaction is created. * @event Client#interaction * @param {Interaction} interaction The interaction which was created * @deprecated Use {@link Client#interactionCreate} instead */ ``` ![image](https://user-images.githubusercontent.com/33201955/137529403-7c0d5066-5e9f-437f-a456-4221a376eab8.png) ```JavaScript /** * Emitted whenever a message is created. * @event Client#message * @param {Message} message The created message * @deprecated Use {@link Client#messageCreate} instead */ ``` ![image](https://user-images.githubusercontent.com/33201955/137529506-7b41165d-17de-4ffc-b0f2-33813c8da787.png) ```JavaScript /** * The type of this embed, either: * * `rich` - a generic embed rendered from embed attributes * * `image` - an image embed * * `video` - a video embed * * `gifv` - an animated gif image embed rendered as a video embed * * `article` - an article embed * * `link` - a link embed * @type {string} * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-types} * @deprecated */ ``` ![image](https://user-images.githubusercontent.com/33201955/137529934-ed6d6142-d8a7-48dd-b5ba-62092ad27220.png) ```JavaScript /** * Whether the channel is editable by the client user * @type {boolean} * @readonly * @deprecated Use {@link VoiceChannel#manageable} instead */ ``` ![image](https://user-images.githubusercontent.com/33201955/137530066-1adf8d36-01de-4949-9a01-e4a3b4fef32a.png)
After ```JavaScript /** * Emitted when an interaction is created. * @event Client#interaction * @param {Interaction} interaction The interaction which was created * @deprecated Use {@link Client#interactionCreate} instead */ ``` ![image](https://user-images.githubusercontent.com/33201955/137530253-876a3128-f5f6-4852-9f84-a843ad9fcdd7.png) ```JavaScript /** * Emitted whenever a message is created. * @event Client#message * @param {Message} message The created message * @deprecated Use {@link Client#messageCreate} instead */ ``` ![image](https://user-images.githubusercontent.com/33201955/137530425-6d07dcd6-ccc3-4c19-82a8-93f756aaad24.png) ```JavaScript /** * The type of this embed, either: * * `rich` - a generic embed rendered from embed attributes * * `image` - an image embed * * `video` - a video embed * * `gifv` - an animated gif image embed rendered as a video embed * * `article` - an article embed * * `link` - a link embed * @type {string} * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-types} * @deprecated */ ``` ![image](https://user-images.githubusercontent.com/33201955/137530496-00cbfa08-7dff-47c6-9f8e-ef4ad7201140.png) ```JavaScript /** * Whether the channel is editable by the client user * @type {boolean} * @readonly * @deprecated Use {@link VoiceChannel#manageable} instead */ ``` ![image](https://user-images.githubusercontent.com/33201955/137530539-643f0fb4-3e3a-4035-b7b4-5179a1e86a82.png)
iCrawl commented 3 years ago

I'd love if it would have some marging top and bottom so it's not so contained or squished with the description of the method itself.

Jiralite commented 3 years ago

I believe I've made suitable adjustments, @iCrawl!

iCrawl commented 3 years ago

Sweet, thanks.