mirror of
https://github.com/System-End/Discord-Bot.git
synced 2026-04-20 00:25:24 +00:00
Ticket fix
This commit is contained in:
parent
3c37bc9815
commit
83ca6ba210
7 changed files with 8 additions and 10 deletions
|
|
@ -163,7 +163,7 @@ fs.readdirSync('./src/handlers').forEach((dir) => {
|
|||
client.login(process.env.DISCORD_TOKEN);
|
||||
|
||||
process.on('unhandledRejection', error => {
|
||||
console.log(error)
|
||||
console.error('Unhandled promise rejection:', error);
|
||||
if(error) if (error.length > 950) error = error.slice(0, 950) + '... view console for details';
|
||||
if(error.stack) if (error.stack.length > 950) error.stack = error.stack.slice(0, 950) + '... view console for details';
|
||||
const embed = new Discord.EmbedBuilder()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ module.exports = async (client, interaction, args) => {
|
|||
}
|
||||
|
||||
client.succNormal({
|
||||
text: `Your AFK has been set up succesfully`,
|
||||
text: `Your AFK has been set up successfully`,
|
||||
type: 'ephemeraledit'
|
||||
}, interaction);
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ module.exports = async (client, interaction, args) => {
|
|||
}
|
||||
else if (boolean == false) {
|
||||
if (!Badges.FLAGS.includes(badge.toUpperCase())) return client.errNormal({
|
||||
error: `The user does not have this badge`,
|
||||
error: `The user doesn't have that badge`,
|
||||
type: `editreply`
|
||||
}, interaction);
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ module.exports = async (client, interaction, args) => {
|
|||
if (!array[0]) {
|
||||
let deleted = await model.deleteMany({ User: member.id });
|
||||
client.succNormal({
|
||||
text: `Removed the ${badgeFlags[badge.toUpperCase()]} (${badge.toUpperCase()}) badge, the user is now removed of the badge system, it has no badges left!`,
|
||||
text: `Removed the ${badgeFlags[badge.toUpperCase()]} (${badge.toUpperCase()}) badge, the user have been removed from the badge system, he has no badges left!`,
|
||||
type: 'editreply'
|
||||
}, interaction);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"normal": {
|
||||
"error": "<:error:1051149558706610278>",
|
||||
"check": "<:check:1051149610674028574>",
|
||||
"error": "❌",
|
||||
"check": "✔️",
|
||||
"music": "🎵",
|
||||
"volume": "🔉",
|
||||
"ball": "🎱",
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ const Commands = require("../../database/models/customCommand");
|
|||
const CommandsSchema = require("../../database/models/customCommandAdvanced");
|
||||
module.exports = async (client, interaction) => {
|
||||
// Commands
|
||||
if (interaction.isCommand() || interaction.isContextMenu()) {
|
||||
if (interaction.isCommand() || interaction.isUserContextMenuCommand()) {
|
||||
await interaction.deferReply({ fetchReply: true });
|
||||
|
||||
banSchema.findOne({ User: interaction.user.id }, async (err, data) => {
|
||||
|
|
@ -187,7 +187,6 @@ module.exports = async (client, interaction) => {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Tickets
|
||||
if (interaction.customId == "Bot_openticket") {
|
||||
return require(`${process.cwd()}/src/commands/tickets/create.js`)(client, interaction);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ const Schema2 = require("../../database/models/channelList");
|
|||
module.exports = (client) => {
|
||||
client.on('messageCreate', async (message) => {
|
||||
if (message.channel.type === 'DM') return;
|
||||
|
||||
Schema.findOne({ Guild: message.guild.id }, async (err, data) => {
|
||||
if (data) {
|
||||
if (data.AntiInvite == true) {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ const shardLogs = new Discord.WebhookClient({
|
|||
});
|
||||
|
||||
const manager = new Discord.ShardingManager('./src/bot.js', {
|
||||
totalShards: 2,
|
||||
totalShards: 'auto',
|
||||
token: process.env.DISCORD_TOKEN,
|
||||
respawn: true
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue