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",
"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\""
]

View file

@ -3,18 +3,18 @@ module.exports = {
name: 'clearchat',
alias: ['cc'],
description: 'Clears the chat',
usage: '[specific] <player>',
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' }])
}