Skip to content

Commit ec190c3

Browse files
committed
feat: Dynamic emoji URL
1 parent 301f866 commit ec190c3

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

guide/additional-info/updating-from-v14.md

+16-5
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,24 @@ The following error codes have been removed as they either have no use or are ha
117117

118118
### Emoji
119119

120-
`Emoji#url` has been removed. To allow more granular control of the returned extension, `Emoji#imageURL()` serves as a replacement:
120+
#### Image URL is now dynamic
121121

122-
```diff
123-
- emoji.url; // Always returns PNG if not animated.
124-
+ emoji.imageURL({ extension: this.animated ? "gif" : "webp" }); // You can choose the format now.
122+
`Emoji#imageURL()` now dynamically handles the extension. Previously, you would have to do this:
123+
124+
```js
125+
emoji.imageURL({ extension: this.animated ? 'gif' : 'webp' });
125126
```
126127

128+
Now, you can simply do this:
129+
130+
```js
131+
emoji.imageURL();
132+
```
133+
134+
#### Emoji URL getter removal
135+
136+
`Emoji#url` has been removed. To allow more granular control of the returned extension, Use `Emoji#imageURL()` instead.
137+
127138
### Events
128139

129140
- `Events.ShardError` has been removed.
@@ -273,7 +284,7 @@ However, you would have already noticed that this no longer works, so this metho
273284

274285
### TextBasedChannel
275286

276-
`TextBasedChannel#bulkDelete()` could return a collection containing `undefined` values. This was because in order to return these messages, the cache must be checked, especially when only snowflakes were provided. The return type of this method has thus changed to only return the snowflakes that were bulk deleted.
287+
`TextBasedChannel#bulkDelete()` could return a collection containing `undefined` values. This was because in order to return these messages, the cache must be checked, especially when only snowflakes were provided. The return type of this method has thus changed to only return an array of snowflakes that were bulk deleted.
277288

278289
### ThreadChannel
279290

0 commit comments

Comments
 (0)