Added get channel logs

This commit is contained in:
hydrabolt
2015-10-31 23:58:47 +00:00
parent 3c16a9f2a4
commit 53ef5df10d
6 changed files with 154 additions and 6 deletions

View File

@@ -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));