diff --git a/commands/music.js b/commands/music.js index bf77a18..839efc5 100644 --- a/commands/music.js +++ b/commands/music.js @@ -71,7 +71,11 @@ module.exports = { playUrl(bot, args.slice(1)); } if (args[0]==='stop') { - bot.core.run('minecraft:tellraw @a ' + JSON.stringify([{text: 'Stopped playing '}, {text: bot.music.song.name, color: 'gold'}])); + try { + bot.core.run('minecraft:tellraw @a ' + JSON.stringify([{text: 'Stopped playing '}, {text: bot.music.song.name, color: 'gold'}])); + } catch (e) { + return; + } bot.music.stop(); } if (args[0]==='loop') { diff --git a/index.js b/index.js index bb2bf77..2edb3fd 100644 --- a/index.js +++ b/index.js @@ -160,7 +160,7 @@ function main() { try { if (bot.queue[0]) { try { - bot.write('chat', {message: bot.queue[0]}); + bot.write('chat', {message: bot.queue[0].substring(0, 256)}); bot.queue.shift(); } catch (e) { return; diff --git a/plugins/commands.js b/plugins/commands.js index 796ee53..acd5ef7 100644 --- a/plugins/commands.js +++ b/plugins/commands.js @@ -33,7 +33,7 @@ function inject(bot, dcclient) { .setDescription(`\`\`\`${e}\`\`\``); channeldc.send({embeds: [Embed]}); } else { - bot.core.run('minecraft:tellraw chayapak ' + JSON.stringify({text: String(e), color: 'red'})); + bot.core.run('minecraft:tellraw @a ' + JSON.stringify({text: String(e), color: 'red'})); } } }; diff --git a/plugins/self_care.js b/plugins/self_care.js index 2b23eeb..2bf20b6 100644 --- a/plugins/self_care.js +++ b/plugins/self_care.js @@ -65,7 +65,7 @@ function inject(bot) { if (gameMode !== 1) bot.chat('/minecraft:gamemode creative @s[type=player]'); if (!prefix) bot.chat('/extras:prefix &8[&eChomeNS Bot&8]'); if (muted) bot.chat('/essentials:mute ' + bot.uuid); - }, 1000); + }, 2000); } module.exports = {inject};