mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-27 09:35:35 -05:00
try catch may fix it11!
This commit is contained in:
parent
30e4c370d9
commit
f0cb30d790
1 changed files with 11 additions and 7 deletions
4
index.js
4
index.js
|
@ -648,6 +648,7 @@ dcclient.on('messageCreate', async (message) => {
|
|||
// } catch (e) {
|
||||
// console.log(e);
|
||||
// }
|
||||
try {
|
||||
const attachment = message.attachments.at(0);
|
||||
if (attachment!=undefined) {
|
||||
if (message.content.toLowerCase()==='') {
|
||||
|
@ -658,6 +659,9 @@ dcclient.on('messageCreate', async (message) => {
|
|||
} else {
|
||||
bot.core.run(`minecraft:tellraw @a ["",{"text":"[","color":"dark_gray"},{"text":"ChomeNS ","color":"yellow","clickEvent":{"action":"open_url","value":"https://discord.gg/xdgCkUyaA4"},"hoverEvent":{"action":"show_text","contents":[{"text":"https://discord.gg/xdgCkUyaA4 ","color":"blue"},{"text":"<-- join now","color":"red"}]}},{"text":"Discord","color":"blue","clickEvent":{"action":"open_url","value":"https://discord.gg/xdgCkUyaA4"},"hoverEvent":{"action":"show_text","contents":[{"text":"https://discord.gg/xdgCkUyaA4 ","color":"blue"},{"text":"<-- join now","color":"red"}]}},{"text":"] ","color":"dark_gray"},{"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}§7#${message.author.discriminator}"} }},{"text":" › ","color":"dark_gray"},` + MessageBuilder.fromString('&7' + message.content) + ']');
|
||||
}
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
dcclient.login(config.discord.token);
|
||||
|
|
Loading…
Reference in a new issue