hoverEvent discord mc message

This commit is contained in:
ChomeNS 2022-10-28 16:21:57 +07:00
parent a6ecadeff7
commit 9badb543de

View file

@ -407,17 +407,35 @@ dcclient.on('messageCreate', async (message) => {
}
const component = [
{text: '[', color: 'dark_gray'},
{text: 'ChomeNS ', color: 'yellow', clickEvent: {
{text: 'ChomeNS ', color: 'yellow',
clickEvent: {
action: 'open_url',
value: 'https://discord.gg/xdgCkUyaA4',
}},
{text: 'Discord', color: 'blue', clickEvent: {
action: 'open_url', value: 'https://discord.gg/xdgCkUyaA4',
}},
},
},
{text: 'Discord', color: 'blue',
clickEvent: {
action: 'open_url',
value: 'https://discord.gg/xdgCkUyaA4',
},
},
{text: '] ', color: 'dark_gray'},
{text: `${message.member.displayName}`, color: 'red', clickEvent: {
action: 'copy_to_clipboard', value: `${message.author.username}#${message.author.discriminator}`,
}},
{text: `${message.member.displayName}`, color: 'red',
clickEvent: {
action: 'copy_to_clipboard',
value: `${message.author.username}#${message.author.discriminator}`,
},
hoverEvent: {
action: 'show_text',
value: [
{text: message.author.username, color: 'white'},
{text: '#', color: 'dark_gray'},
{text: message.author.discriminator, color: 'gray'},
'\n',
{text: 'Click here to copy the tag to your clipboard', color: 'green'},
],
},
},
{text: ' ', color: 'dark_gray'},
chatMessage.MessageBuilder.fromString('&7' + message.content),
attachmentsComponent.length === 0 ? '' : attachmentsComponent,