Compare commits

..

2 Commits

Author SHA1 Message Date
503e06cfcf fixing spelling 2023-01-16 07:44:20 -05:00
93e1b493a3 Adding DiscordID lookup 2023-01-12 23:51:46 -05:00

16
bot.js
View File

@ -149,7 +149,21 @@ client.on('messageCreate', msg => {
} else { } else {
client.channels.fetch(channel_id).then(channel => channel.send(data.toString())) if (data.toString().includes(">")) return
if (!data.toString().startsWith("anon")){
let split = data.toString().split(":")
console.log(split[0])
let dUser = client.users.fetch(split[0]);
dUser.then(function (result) {
console.log(split)
client.channels.fetch(channel_id).then(channel => channel.send(`${result.username}: ${split[1]}`))
});
} else {
client.channels.fetch(channel_id).then(channel => channel.send(data.toString()))
}
} }
}); });
}); });