mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
Added get channel logs
This commit is contained in:
@@ -7,7 +7,11 @@ a.on("debug", (m) => console.log("[debug]",m));
|
||||
|
||||
a.on("message", m => {
|
||||
if(m.content === "$$$")
|
||||
a.sendMessage(m.author, "hi!").catch(e => console.log(e));
|
||||
a.getChannelLogs(m).then( logs => {
|
||||
for(var item of logs){
|
||||
console.log(item.author.username + "> " + item.content);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
a.login(process.env["discordEmail"], process.env["discordPass"]).catch((e)=>console.log(e));
|
||||
Reference in New Issue
Block a user