zumito-framework 1.1.36 → 1.1.37
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/dist/ZumitoFramework.js
CHANGED
|
@@ -15,7 +15,17 @@ export class InteractionCreate extends FrameworkEvent {
|
|
|
15
15
|
commandInstance.args.forEach(arg => {
|
|
16
16
|
let option = interaction.options.get(arg.name);
|
|
17
17
|
if (option) {
|
|
18
|
-
|
|
18
|
+
switch (arg.type) {
|
|
19
|
+
case "user":
|
|
20
|
+
args.set(arg.name, option.user);
|
|
21
|
+
break;
|
|
22
|
+
case "member":
|
|
23
|
+
args.set(arg.name, option.member);
|
|
24
|
+
break;
|
|
25
|
+
default:
|
|
26
|
+
args.set(arg.name, option.value || option.user || option.role || option.channel || option.options || option.message || option.member || option.focused || option.autocomplete || option.attachment);
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
19
29
|
}
|
|
20
30
|
});
|
|
21
31
|
if (![CommandType.any, CommandType.separated, CommandType.slash].includes(commandInstance.type))
|
|
@@ -69,10 +69,15 @@ export class MessageCreate extends FrameworkEvent {
|
|
|
69
69
|
let arg = args[i];
|
|
70
70
|
let type = commandInstance.args[i]?.type;
|
|
71
71
|
if (type) {
|
|
72
|
-
if (type == 'user') {
|
|
72
|
+
if (type == 'member' || type == 'user') {
|
|
73
73
|
const member = await message.guild.members.cache.get(arg.replace(/[<@!>]/g, ''));
|
|
74
74
|
if (member) {
|
|
75
|
-
|
|
75
|
+
if (type == 'user') {
|
|
76
|
+
parsedArgs.set(commandInstance.args[i].name, member.user);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
parsedArgs.set(commandInstance.args[i].name, member);
|
|
80
|
+
}
|
|
76
81
|
}
|
|
77
82
|
else {
|
|
78
83
|
return message.reply({
|