stupid hack to make dms work on gateway v8 until i can get an answer as to why private channels cache isnt populating :/
This commit is contained in:
parent
6e536d850c
commit
fa05d104d3
1 changed files with 6 additions and 1 deletions
|
@ -53,7 +53,12 @@ for (const file of fs.readdirSync(resolve(__dirname, "modules"))) {
|
|||
logger.info("hf:modules", "Loaded module: '%s'", file);
|
||||
}
|
||||
|
||||
bot.on("messageCreate", CommandDispatcher);
|
||||
bot.on("messageCreate", async (msg) => {
|
||||
if (!(msg.channel instanceof Eris.Channel) && msg.author.id != bot.user.id) {
|
||||
msg.channel = await bot.getDMChannel(msg.author.id);
|
||||
}
|
||||
await CommandDispatcher(msg);
|
||||
});
|
||||
bot.on("messageUpdate", (msg) => {
|
||||
const oneDay = Date.now() - 86400000;
|
||||
if (msg.timestamp > oneDay && !msg.hasRan) {
|
||||
|
|
Loading…
Reference in a new issue