mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
25 lines
1.1 KiB
JavaScript
25 lines
1.1 KiB
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, config, hash, ownerhash) {
|
|
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'}]);
|
|
return;
|
|
} else {
|
|
bot.tellraw('@a', [{text: `${'\n'.repeat(100)}`, color: 'white'}, {text: 'The chat has been cleared.', color: 'dark_green'}]);
|
|
}
|
|
},
|
|
discordExecute: function(bot, username, usernameraw, 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'}]);
|
|
return;
|
|
} else {
|
|
bot.tellraw('@a', [{text: `${'\n'.repeat(100)}`, color: 'white'}, {text: 'The chat has been cleared.', color: 'dark_green'}]);
|
|
}
|
|
},
|
|
};
|