feat(Guild): mark as read;

This commit is contained in:
TheDevYellowy 2022-08-02 00:26:12 -05:00
parent 8fc282f2eb
commit 8797069acf
2 changed files with 12 additions and 0 deletions

View File

@ -1429,6 +1429,17 @@ class Guild extends AnonymousGuild {
return this.client.actions.GuildDelete.handle({ id: this.id }).guild; return this.client.actions.GuildDelete.handle({ id: this.id }).guild;
} }
/**
* Marks the guild as read
* @returns {undefined} nothing :)
* @example
* const guild = client.guilds.fetch('222078108977594368');
* guild.read();
*/
async read() {
await this.client.api.guilds(this.id).ack.post();
}
/** /**
* Deletes the guild. * Deletes the guild.
* @returns {Promise<Guild>} * @returns {Promise<Guild>}

1
typings/index.d.ts vendored
View File

@ -1236,6 +1236,7 @@ export class Guild extends AnonymousGuild {
public readonly maximumBitrate: number; public readonly maximumBitrate: number;
public createTemplate(name: string, description?: string): Promise<GuildTemplate>; public createTemplate(name: string, description?: string): Promise<GuildTemplate>;
public delete(): Promise<Guild>; public delete(): Promise<Guild>;
public read(): undefined;
public discoverySplashURL(options?: StaticImageURLOptions): string | null; public discoverySplashURL(options?: StaticImageURLOptions): string | null;
public edit(data: GuildEditData, reason?: string): Promise<Guild>; public edit(data: GuildEditData, reason?: string): Promise<Guild>;
public editWelcomeScreen(data: WelcomeScreenEditData): Promise<WelcomeScreen>; public editWelcomeScreen(data: WelcomeScreenEditData): Promise<WelcomeScreen>;