1
0
Fork 0
mirror of https://github.com/ChomeNS/chomens-bot-mc.git synced 2025-07-25 13:18:45 -04:00
chomens-bot-js/commands/clearchat.js

23 lines
965 B
JavaScript
Raw Normal View History

2022-10-14 15:46:41 +07:00
2022-08-14 16:51:45 +07:00
module.exports = {
name: 'clearchat',
alias: ['cc'],
description: 'Clears the chat',
2022-12-30 11:53:06 +07:00
usage: '[player]',
2022-08-14 16:51:45 +07:00
trusted: 0,
execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) {
2022-12-30 11:53:06 +07:00
if (args[0]) {
bot.tellraw(args.join(' '), [{ text: '\n'.repeat(100), color: 'white' }, { text: `Your chat has been cleared by ${username}.`, color: 'dark_green' }])
2022-08-14 16:51:45 +07:00
} else {
bot.tellraw('@a', [{ text: '\n'.repeat(100), color: 'white' }, { text: 'The chat has been cleared.', color: 'dark_green' }])
2022-08-14 16:51:45 +07:00
}
},
discordExecute (bot, username, sender, prefix, args, channeldc, message) {
2022-12-30 11:53:06 +07:00
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' }])
2022-10-14 15:46:41 +07:00
} else {
bot.tellraw('@a', [{ text: '\n'.repeat(100), color: 'white' }, { text: 'The chat has been cleared.', color: 'dark_green' }])
2022-10-14 15:46:41 +07:00
}
2022-11-27 14:35:28 +07:00
}
}