1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-07-07 10:40:49 +00:00

Fix code to work on this decade 1/x

This commit is contained in:
Christer Warén
2024-02-10 09:33:59 +02:00
parent 99ecd9787d
commit 86b4676159
61 changed files with 3842 additions and 471 deletions

View File

@ -1,9 +1,8 @@
module.exports = function (client) {
const Discord = require('discord.js');
client.on('ready', () => {
require(`./ready.js`).execute(client, Discord);
require(`./ready.js`).execute(client);
}).on('message', (msg) => {
require(`./msg.js`).execute(client, msg, Discord);
require(`./msg.js`).execute(client, msg);
}).on('guildCreate', (guild) => {
require(`./guildCreate.js`).execute(client, guild);
})
@ -34,4 +33,4 @@ module.exports = function (client) {
client.logs.push(`Warn! info: ${info}`);
console.log(`Warn! info: ${info}`);
});
}
}

View File

@ -27,7 +27,7 @@ module.exports = {
},
};
function getCommand(client, args, msg, Discord) {
function getCommand(client, args, msg) {
if (!args[0]) return;
const commandName = args[0].toLowerCase();
if (commandName === "none") return;
@ -37,8 +37,5 @@ function getCommand(client, args, msg, Discord) {
(cmd) => cmd.alias && cmd.alias.includes(commandName)
);
if (!command) return;
if (command.onlyDev && msg.author.id !== client.config.devId) return msg.channel.send(client.messages.onlyDev);
if (client.config.devMode && msg.member.id !== client.config.devId && msg.guild.id !== "718081535240306738")
return msg.channel.send(client.messages.devMode);
client.funcs.exe(msg, args, client, Discord, command);
client.funcs.exe(msg, args, client, command);
}

View File

@ -29,7 +29,6 @@ module.exports = {
client.user.setActivity(`@${client.user.username} help | 🎶`, {
type: "LISTENING",
});
if (client.config.api && !client.config.devMode) client.funcs.botListApi(client);
client.user.setStatus("online");
client.funcs.getSpotifyKey(client);
console.log(`- Activated - Shard: ${client.shard.ids} -`);
@ -42,8 +41,5 @@ module.exports = {
setInterval(() => {
client.funcs.getSpotifyKey(client);
}, 3600000);
setInterval(() => {
client.funcs.ffmpeg(client, Discord);
}, 7200000);
},
};
};