chomens-bot-js/commands/clearchat.js

26 lines
1.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,
2022-11-16 06:09:37 -05:00
execute: function(bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash) {
2022-11-07 07:26:38 -05:00
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'}]);
2022-08-14 05:51:45 -04:00
return;
} else {
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') {
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 {
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
};