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' ,
2022-12-29 23:53:06 -05:00
usage : '[player]' ,
2022-08-14 05:51:45 -04:00
trusted : 0 ,
2022-12-14 08:51:30 -05:00
execute ( bot , username , sender , prefix , args , config , hash , ownerhash , selector ) {
2022-12-29 23:53:06 -05:00
if ( args [ 0 ] ) {
bot . tellraw ( args . join ( ' ' ) , [ { 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
} else {
2022-11-27 02:35:28 -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-12-14 08:51:30 -05:00
discordExecute ( bot , username , sender , prefix , args , channeldc , message ) {
2022-12-29 23:53:06 -05:00
if ( args [ 0 ] ) {
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 04:46:41 -04:00
} else {
2022-11-27 02:35:28 -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-11-27 02:35:28 -05:00
}
}