clearchat don't need specific anymore

This commit is contained in:
ChomeNS 2022-12-30 11:53:06 +07:00
parent 9c0848718b
commit 699c74b427
2 changed files with 7 additions and 7 deletions

View file

@ -1,7 +1,7 @@
[ [
"You can now *music list [directory]",
"Added even more Discord commands support", "Added even more Discord commands support",
"1.19 Support", "1.19 Support",
"*music play file autocomplete", "*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\""
] ]

View file

@ -3,18 +3,18 @@ module.exports = {
name: 'clearchat', name: 'clearchat',
alias: ['cc'], alias: ['cc'],
description: 'Clears the chat', description: 'Clears the chat',
usage: '[specific] <player>', usage: '[player]',
trusted: 0, trusted: 0,
execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) { execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) {
if (args[0] === 'specific') { if (args[0]) {
bot.tellraw(args[1], [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: `Your chat has been cleared by ${username}.`, color: 'dark_green' }]) bot.tellraw(args.join(' '), [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: `Your chat has been cleared by ${username}.`, color: 'dark_green' }])
} else { } else {
bot.tellraw('@a', [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: 'The chat has been cleared.', color: 'dark_green' }]) 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) { discordExecute (bot, username, sender, prefix, args, channeldc, message) {
if (args[0] === 'specific') { if (args[0]) {
bot.tellraw(args[1], [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: `Your chat has been cleared by ${username} (on Discord).`, color: 'dark_green' }]) bot.tellraw(args.join(' '), [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: `Your chat has been cleared by ${username} (on Discord).`, color: 'dark_green' }])
} else { } else {
bot.tellraw('@a', [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: 'The chat has been cleared.', color: 'dark_green' }]) bot.tellraw('@a', [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: 'The chat has been cleared.', color: 'dark_green' }])
} }