mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 13:03:31 +01:00
feat: Support widget image URL (#9782)
* feat: add widget image URL * docs(GuildManager): correct parameter type Co-authored-by: space <spaceeec@yahoo.com> --------- Co-authored-by: space <spaceeec@yahoo.com>
This commit is contained in:
4
packages/discord.js/typings/index.d.ts
vendored
4
packages/discord.js/typings/index.d.ts
vendored
@@ -166,6 +166,7 @@ import {
|
||||
AttachmentFlags,
|
||||
RoleFlags,
|
||||
TeamMemberRole,
|
||||
GuildWidgetStyle,
|
||||
} from 'discord-api-types/v10';
|
||||
import { ChildProcess } from 'node:child_process';
|
||||
import { EventEmitter } from 'node:events';
|
||||
@@ -1384,6 +1385,7 @@ export class Guild extends AnonymousGuild {
|
||||
public fetchWelcomeScreen(): Promise<WelcomeScreen>;
|
||||
public fetchWidget(): Promise<Widget>;
|
||||
public fetchWidgetSettings(): Promise<GuildWidgetSettings>;
|
||||
public widgetImageURL(style?: GuildWidgetStyle): string;
|
||||
public leave(): Promise<Guild>;
|
||||
public disableInvites(disabled?: boolean): Promise<Guild>;
|
||||
public setAFKChannel(afkChannel: VoiceChannelResolvable | null, reason?: string): Promise<Guild>;
|
||||
@@ -3450,6 +3452,7 @@ export class Widget extends Base {
|
||||
private constructor(client: Client<true>, data: RawWidgetData);
|
||||
private _patch(data: RawWidgetData): void;
|
||||
public fetch(): Promise<Widget>;
|
||||
public imageURL(style?: GuildWidgetStyle): string;
|
||||
public id: Snowflake;
|
||||
public name: string;
|
||||
public instantInvite?: string;
|
||||
@@ -3969,6 +3972,7 @@ export class GuildManager extends CachedManager<Snowflake, Guild, GuildResolvabl
|
||||
public create(options: GuildCreateOptions): Promise<Guild>;
|
||||
public fetch(options: Snowflake | FetchGuildOptions): Promise<Guild>;
|
||||
public fetch(options?: FetchGuildsOptions): Promise<Collection<Snowflake, OAuth2Guild>>;
|
||||
public widgetImageURL(guild: GuildResolvable, style?: GuildWidgetStyle): string;
|
||||
}
|
||||
|
||||
export interface AddOrRemoveGuildMemberRoleOptions {
|
||||
|
||||
Reference in New Issue
Block a user