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: function(bot, username, usernameraw, sender, prefix, args) {
|
2022-11-07 07:26:38 -05:00
|
|
|
if (args[0] === 'specific') {
|
2022-11-07 06:30:37 -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
|
|
|
return;
|
|
|
|
} else {
|
2022-11-07 06:30:37 -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
|
|
|
}
|
|
|
|
},
|
2022-10-14 04:46:41 -04:00
|
|
|
discordExecute: function(bot, username, usernameraw, sender, prefix, args, channeldc, message) {
|
2022-11-07 07:26:38 -05:00
|
|
|
if (args[0] === 'specific') {
|
2022-11-07 06:30:37 -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
|
|
|
return;
|
|
|
|
} else {
|
2022-11-07 06:30:37 -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-08-14 05:51:45 -04:00
|
|
|
};
|