2022-08-14 05:51:45 -04:00
/* eslint-disable max-len */
const { between } = require ( '../util/between' ) ;
module . exports = {
name : 'rtp' ,
alias : [ ] ,
description : 'Randomly teleports the player' ,
usage : '' ,
trusted : 0 ,
2022-11-16 06:41:30 -05:00
execute : function ( bot , username , usernameraw , sender , prefix , args , config , hash , ownerhash , selector ) {
2022-08-14 05:51:45 -04:00
const rtppos = ` ${ between ( 20000000 , 500000 ) } 100 ${ between ( 20000000 , 500000 ) } ` ;
2022-11-16 06:41:30 -05:00
bot . tellraw ( selector , [ { text : 'Teleporting ' , color : 'white' } , { text : username , color : 'aqua' } , { text : ' to ' , color : 'white' } , { text : rtppos , color : 'green' } , { text : '...' , color : 'white' } ] ) ;
2022-10-14 01:11:06 -04:00
bot . core . run ( ` essentials:teleport ${ sender } ${ rtppos } ` ) ;
2022-08-14 05:51:45 -04:00
} ,
} ;