mirror of
https://github.com/System-End/Discord-Bot.git
synced 2026-04-19 18:35:22 +00:00
Some more bugs fixes
This commit is contained in:
parent
66a0ce9d71
commit
4ff473276d
2 changed files with 9 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
const { CommandInteraction, Client } = require('discord.js');
|
||||
const { SlashCommandBuilder } = require('discord.js');
|
||||
const Discord = require('discord.js');
|
||||
const Schema = require("../../database/models/functions");
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
@ -63,6 +64,12 @@ module.exports = {
|
|||
*/
|
||||
|
||||
run: async (client, interaction, args) => {
|
||||
const guild = await Schema.findOne({ Guild: interaction.guild.id });
|
||||
if (!guild.Levels) return client.errNormal({
|
||||
error: `The level system is disabled!`,
|
||||
type: 'ephemeral'
|
||||
}, interaction);
|
||||
|
||||
await interaction.deferReply({ fetchReply: true });
|
||||
client.loadSubcommands(client, interaction, args);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ module.exports = {
|
|||
*/
|
||||
|
||||
run: async (client, interaction, args) => {
|
||||
await interaction.deferReply({ fetchReply: true });
|
||||
const badgeFlags = {
|
||||
DEVELOPER: client.emotes.badges.developer,
|
||||
EVENT: client.emotes.badges.event,
|
||||
|
|
@ -63,6 +62,7 @@ module.exports = {
|
|||
|
||||
Schema.findOne({ User: user.id }, async (err, data) => {
|
||||
if (data) {
|
||||
await interaction.deferReply({ fetchReply: true });
|
||||
let Badges = await model.findOne({ User: user.id });
|
||||
|
||||
let credits = 0;
|
||||
|
|
@ -186,7 +186,7 @@ module.exports = {
|
|||
}, interaction);
|
||||
}
|
||||
else {
|
||||
return client.errNormal({ error: "No profile found! Open a profile with /profile create", type: 'editreply' }, interaction);
|
||||
return client.errNormal({ error: "No profile found! Open a profile with /profile create", type: 'ephemeral' }, interaction);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue