mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-30 10:56:55 -05:00
17 lines
675 B
JavaScript
17 lines
675 B
JavaScript
|
/* eslint-disable max-len */
|
||
|
module.exports = {
|
||
|
name: 'clearchat',
|
||
|
alias: ['cc'],
|
||
|
description: 'Clears the chat',
|
||
|
usage: '[specific] <player>',
|
||
|
trusted: 0,
|
||
|
execute: function(bot, username, usernameraw, sender, prefix, args) {
|
||
|
if (args[0]==='specific') {
|
||
|
bot.core.run(`minecraft:tellraw ${args[1]} ` + JSON.stringify([{text: `${'\n'.repeat(100)}`, color: 'white'}, {text: `Your chat has been cleared by ${username}.`, color: 'dark_green'}]));
|
||
|
return;
|
||
|
} else {
|
||
|
bot.core.run(`minecraft:tellraw @a ` + JSON.stringify([{text: `${'\n'.repeat(100)}`, color: 'white'}, {text: 'The chat has been cleared.', color: 'dark_green'}]));
|
||
|
}
|
||
|
},
|
||
|
};
|