mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
use "value" instead of ${value}
+ improve rtp
This commit is contained in:
parent
4f53e61c66
commit
e78cda6373
8 changed files with 17 additions and 18 deletions
|
@ -6,7 +6,7 @@ module.exports = {
|
|||
usage: '',
|
||||
trusted: 0,
|
||||
execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) {
|
||||
bot.tellraw(selector, [{ text: 'The bot\'s username is: ', color: 'white' }, { text: `${bot.username}`, color: 'gold', clickEvent: { action: 'copy_to_clipboard', value: `${bot.username}` }, hoverEvent: { action: 'show_text', contents: [{ text: 'Click here to copy the username to your clipboard', color: 'green' }] } }, { text: ' and the UUID is: ' }, { text: `${bot.uuid}`, color: 'aqua', clickEvent: { action: 'copy_to_clipboard', value: `${bot.uuid}` }, hoverEvent: { action: 'show_text', contents: [{ text: 'Click here to copy the UUID to your clipboard', color: 'green' }] } }])
|
||||
bot.tellraw(selector, [{ text: 'The bot\'s username is: ', color: 'white' }, { text: bot.username, color: 'gold', clickEvent: { action: 'copy_to_clipboard', value: bot.username }, hoverEvent: { action: 'show_text', contents: [{ text: 'Click here to copy the username to your clipboard', color: 'green' }] } }, { text: ' and the UUID is: ' }, { text: bot.uuid, color: 'aqua', clickEvent: { action: 'copy_to_clipboard', value: bot.uuid }, hoverEvent: { action: 'show_text', contents: [{ text: 'Click here to copy the UUID to your clipboard', color: 'green' }] } }])
|
||||
},
|
||||
discordExecute (bot, username, sender, prefix, args, channeldc, message, config) {
|
||||
const Embed = new EmbedBuilder()
|
||||
|
|
|
@ -7,16 +7,16 @@ module.exports = {
|
|||
trusted: 0,
|
||||
execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) {
|
||||
if (args[0]) {
|
||||
bot.tellraw(args.join(' '), [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: `Your chat has been cleared by ${username}.`, color: 'dark_green' }])
|
||||
bot.tellraw(args.join(' '), [{ text: '\n'.repeat(100), color: 'white' }, { text: `Your chat has been cleared by ${username}.`, color: 'dark_green' }])
|
||||
} else {
|
||||
bot.tellraw('@a', [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: 'The chat has been cleared.', color: 'dark_green' }])
|
||||
bot.tellraw('@a', [{ text: '\n'.repeat(100), color: 'white' }, { text: 'The chat has been cleared.', color: 'dark_green' }])
|
||||
}
|
||||
},
|
||||
discordExecute (bot, username, sender, prefix, args, channeldc, message) {
|
||||
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' }])
|
||||
bot.tellraw(args.join(' '), [{ text: '\n'.repeat(100), color: 'white' }, { text: `Your chat has been cleared by ${username} (on Discord).`, color: 'dark_green' }])
|
||||
} else {
|
||||
bot.tellraw('@a', [{ text: `${'\n'.repeat(100)}`, color: 'white' }, { text: 'The chat has been cleared.', color: 'dark_green' }])
|
||||
bot.tellraw('@a', [{ text: '\n'.repeat(100), color: 'white' }, { text: 'The chat has been cleared.', color: 'dark_green' }])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ module.exports = {
|
|||
if (args[1] === 'add' && args[3]) {
|
||||
if (!Number(args[2]) && Number(args[2]) !== 0) throw new SyntaxError('Invalid interval')
|
||||
bot.cloop.add(args.slice(3).join(' '), args[2])
|
||||
bot.tellraw(selector, [{ text: 'Added command ', color: 'white' }, { text: `${args.slice(3).join(' ')}`, color: 'aqua' }, { text: ' with interval ', color: 'white' }, { text: `${args[2]}`, color: 'green' }, { text: ' to the cloops', color: 'white' }])
|
||||
bot.tellraw(selector, [{ text: 'Added command ', color: 'white' }, { text: args.slice(3).join(' '), color: 'aqua' }, { text: ' with interval ', color: 'white' }, { text: args[2], color: 'green' }, { text: ' to the cloops', color: 'white' }])
|
||||
} else if (args[1] === 'list') {
|
||||
list(bot, false, null, selector)
|
||||
} else if (args[1] === 'remove') {
|
||||
|
|
|
@ -5,8 +5,7 @@ module.exports = {
|
|||
usage: '[specific] <player>',
|
||||
trusted: 0,
|
||||
execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const mcData = require('minecraft-data')(bot.version)
|
||||
// const mcData = require('minecraft-data')(bot.version)
|
||||
|
||||
throw new Error('Execute Bypass is patched so this command will be broken for now!')
|
||||
// if (!args[0]) return;
|
||||
|
@ -17,7 +16,7 @@ module.exports = {
|
|||
// bot.tellraw(selector, [{text: 'Entity ', color: 'white'}, {text: entity.displayName, color: 'green'}, {text: ' spawning at everyone...', color: 'white'}]);
|
||||
// } else if (args[1] === 'specific' && args[2]) {
|
||||
// bot.core.run('minecraft:execute unless entity @s[name= run ] run execute as @a at ' + args[2] + ' run summon minecraft:' + entity.name);
|
||||
// bot.tellraw(selector, [{text: `Entity `, color: 'white'}, {text: entity.displayName, color: 'green'}, {text: ' spawning at ', color: 'white'}, {text: `${args[2]}`, color: 'aqua'}]);
|
||||
// bot.tellraw(selector, [{text: `Entity `, color: 'white'}, {text: entity.displayName, color: 'green'}, {text: ' spawning at ', color: 'white'}, {text: args[2], color: 'aqua'}]);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,9 +17,9 @@ module.exports = {
|
|||
execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) {
|
||||
if (args[0] === 'run') {
|
||||
try {
|
||||
bot.tellraw(selector, { text: `${util.inspect(bot.vm.run(args.slice(1).join(' ')), { stylize })}`.substring(0, 32000) })
|
||||
bot.tellraw(selector, { text: util.inspect(bot.vm.run(args.slice(1).join(' ')), { stylize }).substring(0, 32000) })
|
||||
} catch (err) {
|
||||
bot.tellraw(selector, { text: `${util.inspect(err).replaceAll('runner', 'chayapak1')}`, color: 'red' })
|
||||
bot.tellraw(selector, { text: util.inspect(err).replaceAll('runner', 'chayapak1'), color: 'red' })
|
||||
}
|
||||
}
|
||||
if (args[0] === 'reset') {
|
||||
|
@ -33,9 +33,9 @@ module.exports = {
|
|||
colors: 'minecraft',
|
||||
code: args[1]
|
||||
})).then((res) => {
|
||||
bot.tellraw(selector, { text: `${res.data}` })
|
||||
bot.tellraw(selector, { text: res.data })
|
||||
}).catch((err) => {
|
||||
bot.tellraw(selector, { text: `${err}`, color: 'red' })
|
||||
bot.tellraw(selector, { text: err, color: 'red' })
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
|
@ -6,8 +6,8 @@ module.exports = {
|
|||
usage: '',
|
||||
trusted: 0,
|
||||
execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) {
|
||||
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}`)
|
||||
const pos = `${between(1000, 10000)} 100 ${between(1000, 10000)}`
|
||||
bot.tellraw(selector, [{ text: 'Teleporting ', color: 'white' }, { text: username, color: 'aqua' }, { text: ' to ', color: 'white' }, { text: pos, color: 'green' }, { text: '...', color: 'white' }])
|
||||
bot.core.run(`essentials:teleport ${sender} ${pos}`)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ module.exports = {
|
|||
execute (bot, username, sender, prefix, args, config, hash, ownerhash, selector) {
|
||||
const timezone = args.join(' ')
|
||||
const momented = moment().tz(timezone).format('dddd, MMMM Do, YYYY, hh:mm:ss A')
|
||||
const component = [{ text: 'The current date and time for the timezone ', color: 'white' }, { text: timezone, color: 'aqua' }, { text: ' is: ', color: 'white' }, { text: `${momented}`, color: 'green' }]
|
||||
const component = [{ text: 'The current date and time for the timezone ', color: 'white' }, { text: timezone, color: 'aqua' }, { text: ' is: ', color: 'white' }, { text: momented, color: 'green' }]
|
||||
if (timezone.toLowerCase() === 'asia/bangkok' || timezone.toLowerCase() === 'utc') {
|
||||
bot.tellraw(selector, component)
|
||||
} else if (momented === moment().format('dddd, MMMM Do, YYYY, hh:mm:ss A')) {
|
||||
|
|
|
@ -70,7 +70,7 @@ async function inject (bot, dcclient, config) {
|
|||
},
|
||||
{ text: '] ', color: 'dark_gray' },
|
||||
{
|
||||
text: `${message.member.displayName}`,
|
||||
text: message.member.displayName,
|
||||
color: 'red',
|
||||
clickEvent: {
|
||||
action: 'copy_to_clipboard',
|
||||
|
|
Loading…
Reference in a new issue