chomens-bot-js/commands/rtp.js

14 lines
609 B
JavaScript
Raw Normal View History

2022-11-27 02:35:28 -05:00
const { between } = require('../util/between')
2022-08-14 05:51:45 -04:00
module.exports = {
name: 'rtp',
alias: [],
description: 'Randomly teleports the player',
usage: '',
trusted: 0,
execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) {
2022-11-27 02:35:28 -05:00
const rtppos = `${between(20000000, 500000)} 100 ${between(20000000, 500000)}`
bot.tellraw(selector, [{ text: 'Teleporting ', color: 'white' }, { text: username, color: 'aqua' }, { text: ' to ', color: 'white' }, { text: rtppos, color: 'green' }, { text: '...', color: 'white' }])
bot.core.run(`essentials:teleport ${sender} ${rtppos}`)
}
}