mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 13:03:31 +01:00
feat: Support animated WebP (#10987)
* feat: Support animated WebP (#10911) * feat: support animated WebP * refactor: change the rest * fix: remove redundant code * fix(CDN): Export `MakeURLOptions`
This commit is contained in:
@@ -638,6 +638,11 @@ module.exports = Client;
|
||||
* @see {@link https://discord.js.org/docs/packages/rest/stable/ImageURLOptions:Interface}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @external EmojiURLOptions
|
||||
* @see {@link https://discord.js.org/docs/packages/rest/stable/EmojiURLOptions:TypeAlias}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @external BaseImageURLOptions
|
||||
* @see {@link https://discord.js.org/docs/packages/rest/stable/BaseImageURLOptions:Interface}
|
||||
|
||||
@@ -58,7 +58,7 @@ class BaseGuildEmoji extends Emoji {
|
||||
* @method imageURL
|
||||
* @memberof BaseGuildEmoji
|
||||
* @instance
|
||||
* @param {BaseImageURLOptions} [options] Options for the image URL
|
||||
* @param {EmojiURLOptions} [options] Options for the emoji URL
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class Emoji extends Base {
|
||||
|
||||
/**
|
||||
* Returns a URL for the emoji or `null` if this is not a custom emoji.
|
||||
* @param {BaseImageURLOptions} [options] Options for the image URL
|
||||
* @param {EmojiURLOptions} [options] Options for the emoji URL
|
||||
* @returns {?string}
|
||||
*/
|
||||
imageURL(options) {
|
||||
|
||||
6
packages/discord.js/typings/index.d.ts
vendored
6
packages/discord.js/typings/index.d.ts
vendored
@@ -37,7 +37,7 @@ import {
|
||||
} from '@discordjs/formatters';
|
||||
import { Awaitable, JSONEncodable } from '@discordjs/util';
|
||||
import { Collection, ReadonlyCollection } from '@discordjs/collection';
|
||||
import { BaseImageURLOptions, ImageURLOptions, RawFile, REST, RESTOptions } from '@discordjs/rest';
|
||||
import { BaseImageURLOptions, ImageURLOptions, RawFile, REST, RESTOptions, EmojiURLOptions } from '@discordjs/rest';
|
||||
import {
|
||||
WebSocketManager as WSWebSocketManager,
|
||||
IShardingStrategy,
|
||||
@@ -697,7 +697,7 @@ export abstract class BaseGuild extends Base {
|
||||
|
||||
export class BaseGuildEmoji extends Emoji {
|
||||
protected constructor(client: Client<true>, data: RawGuildEmojiData, guild: Guild | GuildPreview);
|
||||
public imageURL(options?: BaseImageURLOptions): string;
|
||||
public imageURL(options?: EmojiURLOptions): string;
|
||||
public get url(): string;
|
||||
public available: boolean | null;
|
||||
public get createdAt(): Date;
|
||||
@@ -1492,7 +1492,7 @@ export class Emoji extends Base {
|
||||
public id: Snowflake | null;
|
||||
public name: string | null;
|
||||
public get identifier(): string;
|
||||
public imageURL(options?: BaseImageURLOptions): string | null;
|
||||
public imageURL(options?: EmojiURLOptions): string | null;
|
||||
public get url(): string | null;
|
||||
public toJSON(): unknown;
|
||||
public toString(): string;
|
||||
|
||||
Reference in New Issue
Block a user