mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
beautify
This commit is contained in:
parent
a655752a50
commit
076ff7b966
2 changed files with 72 additions and 3 deletions
|
@ -6,6 +6,29 @@ module.exports = {
|
|||
usage: '',
|
||||
trusted: 0,
|
||||
execute: function(bot, username, usernameraw, sender, prefix, args) {
|
||||
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(['', {text: 'Your username is: ', color: 'white'}, {text: `${bot.getplayerusername[sender]}`, color: 'gold', clickEvent: {action: 'copy_to_clipboard', value: `${bot.getplayerusername[sender]}`}, hoverEvent: {action: 'show_text', contents: [{text: 'Click here to copy the username to your clipboard', color: 'green'}]}}] ));
|
||||
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(
|
||||
[
|
||||
{
|
||||
text: 'Your username is: ',
|
||||
color: 'white',
|
||||
},
|
||||
{
|
||||
text: bot.getplayerusername[sender],
|
||||
color: 'gold',
|
||||
clickEvent: {
|
||||
action: 'copy_to_clipboard',
|
||||
value: bot.getplayerusername[sender],
|
||||
},
|
||||
hoverEvent: {
|
||||
action: 'show_text',
|
||||
contents: [
|
||||
{
|
||||
text: 'Click here to copy the username to your clipboard',
|
||||
color: 'green',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
]));
|
||||
},
|
||||
};
|
||||
|
|
|
@ -11,9 +11,55 @@ module.exports = {
|
|||
const playername = args.join(' ');
|
||||
const player = bot.playersAddedPlayers[playername];
|
||||
if (player === undefined) throw new SyntaxError('Invalid Username');
|
||||
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(['', {text: `${playername}'s uuid: `, color: 'green'}, {text: `${player}`, color: 'aqua', clickEvent: {action: 'copy_to_clipboard', value: `${player}`}, hoverEvent: {action: 'show_text', contents: [{text: 'Click here to copy the uuid to your clipboard', color: 'green'}]}}]));
|
||||
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(
|
||||
[
|
||||
{
|
||||
text: `${playername}'s uuid: `,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
text: player,
|
||||
color: 'aqua',
|
||||
clickEvent: {
|
||||
action: 'copy_to_clipboard',
|
||||
value: player,
|
||||
},
|
||||
hoverEvent: {
|
||||
action: 'show_text',
|
||||
contents: [
|
||||
{
|
||||
text: 'Click here to copy the uuid to your clipboard',
|
||||
color: 'green',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
]));
|
||||
} else {
|
||||
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(['', {text: `Your uuid: `, color: 'green'}, {text: `${sender}`, color: 'aqua', clickEvent: {action: 'copy_to_clipboard', value: `${sender}`}, hoverEvent: {action: 'show_text', contents: [{text: 'Click here to copy the uuid to your clipboard', color: 'green'}]}}]));
|
||||
bot.core.run('minecraft:tellraw @a ' + JSON.stringify(
|
||||
[
|
||||
{
|
||||
text: `Your uuid: `,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
text: `${sender}`,
|
||||
color: 'aqua',
|
||||
clickEvent: {
|
||||
action: 'copy_to_clipboard',
|
||||
value: sender,
|
||||
},
|
||||
hoverEvent: {
|
||||
action: 'show_text',
|
||||
contents: [
|
||||
{
|
||||
text: 'Click here to copy the uuid to your clipboard',
|
||||
color: 'green',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
]));
|
||||
}
|
||||
},
|
||||
discordExecute: function(bot, username, usernameraw, sender, prefix, args, channeldc, message) {
|
||||
|
|
Loading…
Reference in a new issue