seyfert 2.2.1-dev-13722931057.0 → 2.2.1-dev-13755013058.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -56,7 +56,7 @@ export declare const Transformers: {
|
|
|
56
56
|
DirectoryChannel(client: import("../commands").UsingClient, data: import("../types").APIChannelBase<ChannelType>): DirectoryChannelStructure;
|
|
57
57
|
ClientUser(client: import("../commands").UsingClient, data: import("../types").APIUser, application: Pick<import("../types").APIApplication, "id" | "flags">): ClientUserStructure;
|
|
58
58
|
Guild<State extends StructStates = "api">(client: import("../commands").UsingClient, data: import("../types").APIGuild | import("../types").GatewayGuildCreateDispatchData): GuildStructure<State>;
|
|
59
|
-
GuildBan(client: import("../commands").UsingClient, data: import("../types").APIBan, guildId: string): GuildBanStructure;
|
|
59
|
+
GuildBan(client: import("../commands").UsingClient, data: import("../types").APIBan | import("../types").ActuallyBan, guildId: string): GuildBanStructure;
|
|
60
60
|
Emoji(client: import("../commands").UsingClient, data: import("../types").APIEmoji): EmojiStructure;
|
|
61
61
|
GuildEmoji(client: import("../commands").UsingClient, data: import("../types").APIEmoji, guildId: string): GuildEmojiStructure;
|
|
62
62
|
GuildMember(client: import("../commands").UsingClient, data: import("../structures").GuildMemberData, user: import("../types").APIUser, guildId: string): GuildMemberStructure;
|
|
@@ -3,13 +3,13 @@ import type { GuildBanStructure, GuildStructure } from '../client';
|
|
|
3
3
|
import type { UsingClient } from '../commands';
|
|
4
4
|
import { type MethodContext, type ObjectToLower } from '../common';
|
|
5
5
|
import type { BanShorter } from '../common/shorters/bans';
|
|
6
|
-
import type { APIBan, RESTGetAPIGuildBansQuery } from '../types';
|
|
6
|
+
import type { APIBan, ActuallyBan, RESTGetAPIGuildBansQuery } from '../types';
|
|
7
7
|
import { DiscordBase } from './extra/DiscordBase';
|
|
8
8
|
export interface GuildBan extends DiscordBase, ObjectToLower<Omit<APIBan, 'id'>> {
|
|
9
9
|
}
|
|
10
10
|
export declare class GuildBan extends DiscordBase {
|
|
11
11
|
readonly guildId: string;
|
|
12
|
-
constructor(client: UsingClient, data: APIBan, guildId: string);
|
|
12
|
+
constructor(client: UsingClient, data: APIBan | ActuallyBan, guildId: string);
|
|
13
13
|
create(body?: Parameters<BanShorter['create']>[2], reason?: string): Promise<void>;
|
|
14
14
|
remove(reason?: string): Promise<never>;
|
|
15
15
|
guild(mode?: 'rest' | 'flow'): Promise<GuildStructure<'cached' | 'api'>>;
|
|
@@ -6,7 +6,8 @@ const DiscordBase_1 = require("./extra/DiscordBase");
|
|
|
6
6
|
class GuildBan extends DiscordBase_1.DiscordBase {
|
|
7
7
|
guildId;
|
|
8
8
|
constructor(client, data, guildId) {
|
|
9
|
-
|
|
9
|
+
const id = 'user' in data ? data.user.id : data.id;
|
|
10
|
+
super(client, { ...data, id });
|
|
10
11
|
this.guildId = guildId;
|
|
11
12
|
}
|
|
12
13
|
create(body, reason) {
|
|
@@ -837,6 +837,23 @@ export interface APIBan {
|
|
|
837
837
|
*/
|
|
838
838
|
user: APIUser;
|
|
839
839
|
}
|
|
840
|
+
/**
|
|
841
|
+
* @unstable Intended for future use, but not yet documented
|
|
842
|
+
*/
|
|
843
|
+
export interface ActuallyBan {
|
|
844
|
+
/**
|
|
845
|
+
* The reason for the ban
|
|
846
|
+
*/
|
|
847
|
+
reason: string | null;
|
|
848
|
+
/**
|
|
849
|
+
* The banned user
|
|
850
|
+
*/
|
|
851
|
+
id: string;
|
|
852
|
+
/**
|
|
853
|
+
* The guild this ban is for
|
|
854
|
+
*/
|
|
855
|
+
guild_id: string;
|
|
856
|
+
}
|
|
840
857
|
/**
|
|
841
858
|
* https://discord.com/developers/docs/resources/guild#guild-widget-object
|
|
842
859
|
*/
|