i didn't JSON.stringify() in the discord command

This commit is contained in:
ChomeNS 2022-11-06 08:10:42 +07:00
parent c4c2cd48e7
commit 6999a15575

View file

@ -5,6 +5,19 @@ module.exports = {
usage: '',
trusted: 0,
execute: function(bot) {
bot.core.run('minecraft:tellraw @a ["",{"text":"The Discord invite is ","color":"white"},{"text":"https://discord.gg/xdgCkUyaA4","color":"blue","clickEvent":{"action":"open_url","value":"https://discord.gg/xdgCkUyaA4"}}]');
bot.core.run('minecraft:tellraw @a' + JSON.stringify([
{
text: 'The Discord invite is ',
color: 'white',
},
{
text: 'https://discord.gg/xdgCkUyaA4',
color: 'blue',
clickEvent: {
action: 'open_url',
value: 'https://discord.gg/xdgCkUyaA4'
},
},
]));
},
};