Implement execution code with basic message tracking and GUI display

This commit is contained in:
chylex 2016-10-25 15:31:56 +02:00
parent bc81581f94
commit 21f02b826a

View File

@ -1 +1,13 @@
/* execution */
DISCORD.setupMessageRequestHook((channel, messages) => {
if (STATE.isTracking()){
var info = DISCORD.getSelectedChannel();
if (info.id == channel){ // Discord has a bug where the message request may be sent without switching channels
STATE.addDiscordChannel(info.server, info.type, channel, info.channel);
STATE.addDiscordMessages(channel, messages);
}
}
});
GUI.showController();
GUI.showSettings();