seyfert 3.2.5-dev-16254781135.0 → 3.2.5-dev-16255031273.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.
|
@@ -49,7 +49,7 @@ export declare class MemberShorter extends BaseShorter {
|
|
|
49
49
|
* @returns A Promise that resolves to the edited member.
|
|
50
50
|
*/
|
|
51
51
|
edit(guildId: string, memberId: string, body: RESTPatchAPIGuildMemberJSONBody | {
|
|
52
|
-
nick?: string;
|
|
52
|
+
nick?: string | null;
|
|
53
53
|
}, reason?: string): Promise<GuildMemberStructure>;
|
|
54
54
|
/**
|
|
55
55
|
* Adds a member to the guild.
|
|
@@ -83,7 +83,7 @@ class MemberShorter extends base_1.BaseShorter {
|
|
|
83
83
|
* @returns A Promise that resolves to the edited member.
|
|
84
84
|
*/
|
|
85
85
|
async edit(guildId, memberId, body, reason) {
|
|
86
|
-
memberId = memberId === this.client.botId &&
|
|
86
|
+
memberId = memberId === this.client.botId && 'nick' in body ? '@me' : memberId;
|
|
87
87
|
const member = await this.client.proxy.guilds(guildId).members(memberId).patch({ body, reason });
|
|
88
88
|
await this.client.cache.members?.setIfNI(cache_1.CacheFrom.Rest, 'GuildMembers', memberId, guildId, member);
|
|
89
89
|
return transformers_1.Transformers.GuildMember(this.client, member, member.user, guildId);
|