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:
Jiralite
2023-09-17 19:26:47 +01:00
committed by GitHub
parent 310979808e
commit b6a2441819
5 changed files with 42 additions and 1 deletions

View File

@@ -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 {