chomens-bot-js/commands/clearchat.js

24 lines
1 KiB
JavaScript
Raw Normal View History

2022-08-14 05:51:45 -04:00
/* eslint-disable max-len */
2022-10-14 04:46:41 -04:00
2022-08-14 05:51:45 -04:00
module.exports = {
name: 'clearchat',
alias: ['cc'],
description: 'Clears the chat',
usage: '[specific] <player>',
trusted: 0,
execute (bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash, selector) {
2022-11-07 07:26:38 -05:00
if (args[0] === 'specific') {
2022-11-27 02:35:28 -05:00
bot.tellraw(args[1], [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: `Your chat has been cleared by ${username}.`, color: 'dark_green' }])
2022-08-14 05:51:45 -04:00
} else {
2022-11-27 02:35:28 -05:00
bot.tellraw('@a', [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: 'The chat has been cleared.', color: 'dark_green' }])
2022-08-14 05:51:45 -04:00
}
},
discordExecute (bot, username, usernameraw, sender, prefix, args, channeldc, message) {
2022-11-07 07:26:38 -05:00
if (args[0] === 'specific') {
2022-11-27 02:35:28 -05:00
bot.tellraw(args[1], [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: `Your chat has been cleared by ${username} (on Discord).`, color: 'dark_green' }])
2022-10-14 04:46:41 -04:00
} else {
2022-11-27 02:35:28 -05:00
bot.tellraw('@a', [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: 'The chat has been cleared.', color: 'dark_green' }])
2022-10-14 04:46:41 -04:00
}
2022-11-27 02:35:28 -05:00
}
}