FridayNightFunkinBoyfriendBot/commands/tpr.js

25 lines
812 B
JavaScript
Raw Normal View History

2023-12-17 14:55:27 -05:00
const between = require('../util/between')
const CommandError = require('../CommandModules/command_error')
2023-12-17 14:55:27 -05:00
module.exports = {
name: 'tpr',
description:['teleport to a random place'],
2023-12-20 11:54:03 -05:00
trustLevel: 0,
2023-12-17 14:55:27 -05:00
aliases:['rtp', 'teleportrandom', 'randomteleport'],
execute (context) {
const bot = context.bot
const sender = context.source.player
const source = context.source
if (!sender) return
const x = between(-1_000_000, 1_000_000)
const y = 100
const z = between(-1_000_000, 1_000_000)
2024-01-27 11:10:50 -05:00
if (!bot.options.Core.enabled){
throw new CommandError('Coreless mode is active can not execute command!')
}else{
source.sendFeedback(`Randomly Teleported: ${sender.profile.name} to x:${x} y:${y} z:${z} `)
2023-12-17 14:55:27 -05:00
bot.core.run(`tp ${sender.uuid} ${x} ${y} ${z}`)
}
}
}