seyfert 3.2.5-dev-16254781135.0 → 3.2.5-dev-16284796103.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.
package/lib/commands/handler.js
CHANGED
|
@@ -282,7 +282,7 @@ class CommandHandler extends common_1.BaseHandler {
|
|
|
282
282
|
//@AutoLoad
|
|
283
283
|
const options = await this.getFiles((0, node_path_1.dirname)(file.path));
|
|
284
284
|
for (const option of options) {
|
|
285
|
-
if (file.
|
|
285
|
+
if (file.path === option) {
|
|
286
286
|
continue;
|
|
287
287
|
}
|
|
288
288
|
try {
|
|
@@ -20,7 +20,7 @@ export declare class OptionResolver {
|
|
|
20
20
|
readonly options: OptionResolved[];
|
|
21
21
|
hoistedOptions: OptionResolved[];
|
|
22
22
|
private subCommand;
|
|
23
|
-
private group
|
|
23
|
+
private group?;
|
|
24
24
|
constructor(client: UsingClient, options: APIApplicationCommandInteractionDataOption[], parent?: Command | undefined, guildId?: string | undefined, resolved?: ContextOptionsResolved | undefined);
|
|
25
25
|
get fullCommandName(): string;
|
|
26
26
|
getCommand(): Command | SubCommand | undefined;
|
|
@@ -28,7 +28,7 @@ export declare class OptionResolver {
|
|
|
28
28
|
getAutocomplete(): CommandAutocompleteOption | undefined;
|
|
29
29
|
getParent(): string | undefined;
|
|
30
30
|
getSubCommand(): string | null;
|
|
31
|
-
getGroup(): string |
|
|
31
|
+
getGroup(): string | undefined;
|
|
32
32
|
get(name: string): OptionResolved | undefined;
|
|
33
33
|
getHoisted(name: string): OptionResolved | undefined;
|
|
34
34
|
getValue(name: string): AllChannels | Attachment | boolean | number | string | UserStructure | GuildMemberStructure | InteractionGuildMemberStructure | GuildRoleStructure | undefined;
|
|
@@ -13,7 +13,7 @@ class OptionResolver {
|
|
|
13
13
|
options;
|
|
14
14
|
hoistedOptions;
|
|
15
15
|
subCommand = null;
|
|
16
|
-
group
|
|
16
|
+
group;
|
|
17
17
|
constructor(client, options, parent, guildId, resolved) {
|
|
18
18
|
this.client = client;
|
|
19
19
|
this.parent = parent;
|
|
@@ -35,7 +35,7 @@ class OptionResolver {
|
|
|
35
35
|
}
|
|
36
36
|
getCommand() {
|
|
37
37
|
if (this.subCommand) {
|
|
38
|
-
return this.parent?.options?.find(x =>
|
|
38
|
+
return this.parent?.options?.find(x => this.group === x.group && x.name === this.subCommand);
|
|
39
39
|
}
|
|
40
40
|
return this.parent;
|
|
41
41
|
}
|
|
@@ -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);
|