made it show less error
This commit is contained in:
parent
9a87d6c1ea
commit
90a5d7e3f5
2 changed files with 6 additions and 4 deletions
|
@ -10,9 +10,9 @@ client.on("messageCreate", async message => {
|
|||
nothahaa.setNickname(`${message.author.username}`).catch();
|
||||
await client.data.DelAFK(message.author.id);
|
||||
}
|
||||
if (message.mentions.users.first()) {
|
||||
if (message.mentions.users.first()?.id) {
|
||||
const data1 = await client.data.getUser(
|
||||
message.mentions.members.first().id
|
||||
message.mentions.members.first()?.id
|
||||
);
|
||||
if (data1?.AFK) {
|
||||
message.reply({
|
||||
|
|
6
util/dist/handler.js
vendored
6
util/dist/handler.js
vendored
|
@ -30,7 +30,7 @@ module.exports = async client => {
|
|||
client.on("ready", async () => {
|
||||
const gg = client.guilds.cache.get("840225563193114624");
|
||||
await gg.commands.set(ownercmds);
|
||||
await client.application.commands.set(cmds).then(async cmd => {
|
||||
await client.application.commands.catch(null).then(async cmd => {
|
||||
client.guilds.cache.forEach(g => {
|
||||
const getroles = name => {
|
||||
const perms = cmds.find(n => n.name == name).UserPerms;
|
||||
|
@ -47,7 +47,9 @@ module.exports = async client => {
|
|||
}, []);
|
||||
return [...accumulator, { id: v.id, permissions }];
|
||||
}, []);
|
||||
g.commands.permissions.set({ fullPermissions });
|
||||
try {
|
||||
g.commands.permissions.set({ fullPermissions });
|
||||
} catch {}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue