diff --git a/changelog.json b/changelog.json index 5cf1483..1a7231e 100644 --- a/changelog.json +++ b/changelog.json @@ -1,7 +1,7 @@ [ - "You can now *music list [directory]", "Added even more Discord commands support", "1.19 Support", "*music play file autocomplete", - "Improved URL loading in *draw and *music playurl" + "Improved URL loading in *draw and *music playurl", + "You can now do *clearchat [player] without \"specific\"" ] \ No newline at end of file diff --git a/commands/clearchat.js b/commands/clearchat.js index 1d9c7a5..d6e90d4 100644 --- a/commands/clearchat.js +++ b/commands/clearchat.js @@ -3,18 +3,18 @@ module.exports = { name: 'clearchat', alias: ['cc'], description: 'Clears the chat', - usage: '[specific] ', + usage: '[player]', trusted: 0, execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) { - if (args[0] === 'specific') { - bot.tellraw(args[1], [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: `Your chat has been cleared by ${username}.`, color: 'dark_green' }]) + if (args[0]) { + bot.tellraw(args.join(' '), [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: `Your chat has been cleared by ${username}.`, color: 'dark_green' }]) } else { bot.tellraw('@a', [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: 'The chat has been cleared.', color: 'dark_green' }]) } }, discordExecute (bot, username, sender, prefix, args, channeldc, message) { - if (args[0] === 'specific') { - bot.tellraw(args[1], [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: `Your chat has been cleared by ${username} (on Discord).`, color: 'dark_green' }]) + if (args[0]) { + bot.tellraw(args.join(' '), [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: `Your chat has been cleared by ${username} (on Discord).`, color: 'dark_green' }]) } else { bot.tellraw('@a', [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: 'The chat has been cleared.', color: 'dark_green' }]) }