Adding DiscordID lookup
This commit is contained in:
parent
cc49b165b0
commit
93e1b493a3
16
bot.js
16
bot.js
@ -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("annon")){
|
||||||
|
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()))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user