chomens-bot-js/commands/rtp.js
ChomeNS 6895a37104 bot.tellraw()
i totally did not used the search icon thing in vscode
2022-11-07 18:30:37 +07:00

14 lines
615 B
JavaScript

/* eslint-disable max-len */
const {between} = require('../util/between');
module.exports = {
name: 'rtp',
alias: [],
description: 'Randomly teleports the player',
usage: '',
trusted: 0,
execute: function(bot, username, usernameraw, sender, prefix, args) {
const rtppos = `${between(20000000, 500000)} 100 ${between(20000000, 500000)}`;
bot.tellraw('@a', [{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}`);
},
};