2022-10-14 15:46:41 +07:00
2022-08-14 16:51:45 +07:00
module . exports = {
name : 'clearchat' ,
alias : [ 'cc' ] ,
description : 'Clears the chat' ,
2022-12-30 11:53:06 +07:00
usage : '[player]' ,
2022-08-14 16:51:45 +07:00
trusted : 0 ,
2022-12-14 20:51:30 +07:00
execute ( bot , username , sender , prefix , args , config , hash , ownerhash , selector ) {
2022-12-30 11:53:06 +07:00
if ( args [ 0 ] ) {
2022-12-30 15:05:48 +07:00
bot . tellraw ( args . join ( ' ' ) , [ { text : '\n' . repeat ( 100 ) , color : 'white' } , { text : ` Your chat has been cleared by ${ username } . ` , color : 'dark_green' } ] )
2022-08-14 16:51:45 +07:00
} else {
2022-12-30 15:05:48 +07:00
bot . tellraw ( '@a' , [ { text : '\n' . repeat ( 100 ) , color : 'white' } , { text : 'The chat has been cleared.' , color : 'dark_green' } ] )
2022-08-14 16:51:45 +07:00
}
} ,
2022-12-14 20:51:30 +07:00
discordExecute ( bot , username , sender , prefix , args , channeldc , message ) {
2022-12-30 11:53:06 +07:00
if ( args [ 0 ] ) {
2022-12-30 15:05:48 +07:00
bot . tellraw ( args . join ( ' ' ) , [ { text : '\n' . repeat ( 100 ) , color : 'white' } , { text : ` Your chat has been cleared by ${ username } (on Discord). ` , color : 'dark_green' } ] )
2022-10-14 15:46:41 +07:00
} else {
2022-12-30 15:05:48 +07:00
bot . tellraw ( '@a' , [ { text : '\n' . repeat ( 100 ) , color : 'white' } , { text : 'The chat has been cleared.' , color : 'dark_green' } ] )
2022-10-14 15:46:41 +07:00
}
2022-11-27 14:35:28 +07:00
}
}