1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-06-16 18:56:00 +00:00

Moved rest of the messages to messages file

This commit is contained in:
MatteZ02
2020-03-12 23:07:44 +02:00
parent dd2f33873b
commit e15e81d9fe
13 changed files with 68 additions and 32 deletions

View File

@ -8,8 +8,8 @@ module.exports = {
category: 'info',
async execute(msg, args, client, Discord, prefix) {
const embed = new Discord.MessageEmbed()
.setTitle(`Found a bug with ${client.user.username}?\nDM the core developer:`)
.setDescription(client.messages.bug)
.setTitle(client.messages.bugTitle)
.setDescription(client.messages.bugDesc)
.setColor(client.config.embedColor);
msg.channel.send(embed);
},

View File

@ -22,9 +22,9 @@ module.exports = {
});
const embed = new Discord.MessageEmbed();
embed
.setTitle('Musix Command Usage During Current Uptime')
.setTitle(client.messages.cmdUsesTitle)
.setDescription('```ml\n' + markdownrows.join('\n') + '\n```')
.setFooter('These statistics are from the current uptime.')
.setFooter(client.messages.cmdUsesFooter)
.setColor(client.config.embedColor);
msg.channel.send(embed);
},

View File

@ -21,7 +21,7 @@ module.exports = {
output = error.toString();
}
const embed = new Discord.MessageEmbed()
.setTitle('Evaluation Command')
.setTitle(client.messages.evalTitle)
.setColor(client.config.embedColor)
.setDescription(`Input: \`\`\`js\n${input.replace(/; /g, ';').replace(/;/g, ';\n')}\n\`\`\`\nOutput: \`\`\`\n${output}\n\`\`\``);
return msg.channel.send(embed);

View File

@ -13,7 +13,7 @@ module.exports = {
const embed = new Discord.MessageEmbed()
.setTitle(`${client.global.db.guilds[msg.guild.id].prefix}${command.name} ${command.usage}`)
.setDescription(command.description)
.setFooter(`Command Alias: \`${command.alias}\``)
.setFooter(`${client.messages.helpCmdFooter} \`${command.alias}\``)
.setColor(client.config.embedColor)
msg.channel.send(embed);
} else {
@ -25,10 +25,11 @@ module.exports = {
for (let i = 0; i < categories.length; i++) {
commands += `**» ${categories[i].toUpperCase()}**\n${client.commands.filter(x => x.category === categories[i] && !x.omitFromHelp && !x.onlyDev).map(x => `\`${x.name}\``).join(', ')}\n`;
}
client.messages.help = client.messages.help.replace("%PREFIX%", prefix);
const embed = new Discord.MessageEmbed()
.setTitle(`${client.user.username} help:`)
.setTitle(`${client.user.username} ${client.messages.help}`)
.setDescription(commands)
.setFooter(`"${client.global.db.guilds[msg.guild.id].prefix}help <command>" to see more information about a command.`)
.setFooter(client.messages.helpFooter)
.setColor(client.config.embedColor)
msg.channel.send(embed);
}

View File

@ -8,7 +8,7 @@ module.exports = {
category: 'info',
execute(msg, args, client, Discord, prefix) {
const embed = new Discord.MessageEmbed()
.setTitle(`Invite ${client.user.username} to your Discord server!`)
.setTitle(client.messages.inviteTitle)
.setURL(client.config.invite)
.setColor(client.config.embedColor)
return msg.channel.send(embed);

View File

@ -21,7 +21,7 @@ module.exports = {
const thumbnail = getThumb(serverQueue.songs[0].url);
const embed = new Discord.MessageEmbed()
.setTitle(client.messages.nowPlaying)
.setDescription(`<a:aNotes:674602408105476106>**Now playing:** ${serverQueue.songs[0].title}\n${array.join('')} | \`${client.funcs.msToTime(completed, "hh:mm:ss")} / ${client.funcs.msToTime(songtime, "hh:mm:ss")}\``)
.setDescription(`${client.messages.nowPlayingDesc} ${serverQueue.songs[0].title}\n${array.join('')} | \`${client.funcs.msToTime(completed, "hh:mm:ss")} / ${client.funcs.msToTime(songtime, "hh:mm:ss")}\``)
.setFooter(`Queued by ${serverQueue.songs[0].author.tag}`)
.setURL(serverQueue.songs[0].url)
.setThumbnail(thumbnail._rejectionHandler0)

View File

@ -14,24 +14,25 @@ module.exports = {
}
let page = parseInt(args[1]);
if (!page) page = 1;
let pagetext = `:page_facing_up: Page: ${page} :page_facing_up:`
if (page === 1) pagetext = ':arrow_down: Next in queue :arrow_down:'
let pagetext = client.messages.queuePages;
if (page === 1) pagetext = client.messages.queueFirstPage;
let queuesongs = serverQueue.songs.slice((page - 1) * 20 + 1, page * 20 + 1);
let queuemessage = `${queuesongs.map(song => `**#** ${song.title}`).join('\n')}`
const hashs = queuemessage.split('**#**').length;
for (let i = 0; i < hashs; i++) {
queuemessage = queuemessage.replace('**#**', `**${i + 1}**`);
}
client.messages.queueDesc = client.messages.queueDesc.replace("%SONG%", song.title);
if (!serverQueue.looping) {
const embed = new Discord.MessageEmbed()
.setTitle("__Song queue__")
.setDescription(`**Now playing:** ${serverQueue.songs[0].title}<a:aNotes:674602408105476106>\n${pagetext}\n${queuemessage}`)
.setTitle(client.messages.queueTitle)
.setDescription(`${client.messages.queueDesc}\n${pagetext}\n${queuemessage}`)
.setColor(client.config.embedColor)
return msg.channel.send(embed);
} else {
const embed = new Discord.MessageEmbed()
.setTitle("__Song queue__")
.setDescription(`**Now playing:** ${serverQueue.songs[0].title}<a:aNotes:674602408105476106>\n${pagetext}\n${queuemessage}`)
.setTitle(client.messages.queueTitle)
.setDescription(`${client.messages.queueDesc}\n${pagetext}\n${queuemessage}`)
.setFooter('<:repeat1:674685561377914892> Currently looping the queue!')
.setColor(client.config.embedColor)
return msg.channel.send(embed);

View File

@ -8,14 +8,14 @@ module.exports = {
category: 'util',
async execute(msg, args, client, Discord, prefix, command) {
const embed = new Discord.MessageEmbed()
.setTitle('Guild settings for Musix')
.addField('prefix', 'Change the guild specific prefix. (string)', true)
.addField('volume', 'Change the default volume that the bot will start playing at. (number)', true)
.addField('permissions', 'Change whether to require permissions to use eg `skip, stop, pause, loop, etc...`', true)
.addField('setdj', 'Set a DJ role. This will allow chosen users to freely use all Musix commands. This will automatically set the `permissions` settings to true in order for the `DJ` role to have effect!', true)
.addField('announcesongs', 'Whether to announce songs that start playing or not.')
.addField('bass', 'Change the default bass level `Not supported`', true)
.setFooter(`how to use: ${prefix}settings <Setting name> <value>`)
.setTitle(client.messages.settingsTitle)
.addField(client.messages.settingsPrefix, client.messages.settingsPrefixDesc, true)
.addField(client.messages.settingsVolume, client.messages.settingsVolumeDesc, true)
.addField(client.messages.settingsPermissions, client.messages.settingsPermissionsDesc, true)
.addField(client.messages.settingsSetDj, client.messages.settingsSetDjDesc, true)
.addField(client.messages.settingsAnnounceSongs, client.messages.settingsAnnounceSongsDesc)
.addField(client.messages.settingsBass, client.messages.settingsBassDesc, true)
.setFooter(client.messages.settingsFooter)
.setAuthor(client.user.username, client.user.displayAvatarURL)
.setColor(client.embedColor)
const permissions = msg.channel.permissionsFor(msg.author);

View File

@ -1,7 +1,7 @@
module.exports = {
name: 'prefix',
async execute(msg, args, client, Discord, prefix) {
if (!args[2]) return msg.channel.send(`Current prefix: \`${client.global.db.guilds[msg.guild.id].prefix}\``);
if (!args[2]) return msg.channel.send(`${client.messages.currentPrefix} \`${client.global.db.guilds[msg.guild.id].prefix}\``);
client.global.db.guilds[msg.guild.id].prefix = args[2];
msg.channel.send(`${client.messages.prefixSet} \`${args[2]}\``);
}

View File

@ -12,10 +12,10 @@ module.exports = {
const latency = m.createdTimestamp - msg.createdTimestamp;
const embed = new Discord.MessageEmbed()
.setTitle(`Status for ${client.user.username}`)
.addField(':signal_strength: Ping', client.ws.ping, true)
.addField('Latency', latency, true)
.addField(':stopwatch: Uptime', uptime, true)
.setTitle(client.messages.statusTitle)
.addField(client.messages.statusField1, client.ws.ping, true)
.addField(client.messages.statusField2, latency, true)
.addField(client.messages.statusField3, uptime, true)
.setAuthor(client.user.username, client.user.displayAvatarURL)
.setColor(client.config.embedColor)
m.delete();