xernerx 2.1.4 → 2.1.7
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.
|
@@ -34,7 +34,7 @@ class CommandValidation {
|
|
|
34
34
|
return emit("missing admin permission", "Administrator")
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
if (command?.channel == "guild" && event?.channel?.type !=
|
|
37
|
+
if (command?.channel == "guild" && event?.channel?.type != Discord.ChannelType.GuildText) {
|
|
38
38
|
res = true
|
|
39
39
|
return emit("not a guild channel");
|
|
40
40
|
}
|
package/models/data/Util.js
CHANGED
|
@@ -182,11 +182,21 @@ class Util {
|
|
|
182
182
|
const msg = await message.channel.messages.fetch(message.client.messages[message.id]);
|
|
183
183
|
|
|
184
184
|
message.util.send = async (e) => {
|
|
185
|
-
|
|
185
|
+
try {
|
|
186
|
+
return await msg.edit(e);
|
|
187
|
+
}
|
|
188
|
+
catch {
|
|
189
|
+
message.channel.send(e);
|
|
190
|
+
}
|
|
186
191
|
}
|
|
187
192
|
|
|
188
193
|
message.util.reply = async (e) => {
|
|
189
|
-
|
|
194
|
+
try {
|
|
195
|
+
return await msg.edit(e);
|
|
196
|
+
}
|
|
197
|
+
catch {
|
|
198
|
+
message.reply(e);
|
|
199
|
+
}
|
|
190
200
|
}
|
|
191
201
|
|
|
192
202
|
return;
|
|
@@ -109,7 +109,7 @@ class CommandHandler {
|
|
|
109
109
|
if (type === "interaction commands" && client.settings.logging) console.log(logStyle(`${client.user.tag} is online in ${(await client.guilds.fetch()).size} servers.`, "text", "cyan"));
|
|
110
110
|
|
|
111
111
|
try {
|
|
112
|
-
if (client.global == true) {
|
|
112
|
+
if (client.settings.global == true) {
|
|
113
113
|
if (logging || this.client.settings.logging) console.info(logStyle(`Loaded ${type} in ${(await client.guilds.fetch()).size} server(s) globally.`, 'text', 'purple'));
|
|
114
114
|
rest.put(Routes.applicationCommands(client.user.id), {
|
|
115
115
|
body: this.commands
|
|
@@ -35,7 +35,7 @@ class EventHandler {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
if (logging || this.client.logging) console.info(logStyle(`Loaded events: ${events.join(', ')}`, 'text', 'purple'));
|
|
38
|
+
if (logging || this.client.settings.logging) console.info(logStyle(`Loaded events: ${events.join(', ')}`, 'text', 'purple'));
|
|
39
39
|
|
|
40
40
|
const builderFiles = fs.readdirSync(`${__dirname}/../events`).filter(file => file.endsWith('.js'))
|
|
41
41
|
|