diff --git a/src/bot.ts b/src/bot.ts index 2c7ec056e84340912f46988dd067875841472b48..d88c10bffb5d22c5275948faf90d584151740e5d 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -145,7 +145,7 @@ export class DiscordBot { } this.channelLocks[channel.id] = {i: null, r: null, p: null}; - const p = new Promise((resolve) => { + const p = new Promise<{}>((resolve) => { const i = setTimeout(() => { log.warn(`Lock on channel ${channel.id} expired. Discord is lagging behind?`); this.unlockChannel(channel); diff --git a/src/store.ts b/src/store.ts index db1b9f09cde2cc4fc43aab2c456c79f077921111..31764b28266f2f71ea5e5c1ba60a9cd91db88a4a 100644 --- a/src/store.ts +++ b/src/store.ts @@ -72,7 +72,7 @@ export class DiscordStore { return resolve(err === null); }); }).then(async (result) => { - return new Promise((resolve, reject) => { + return new Promise<void|{}>((resolve, reject) => { if (!result) { log.warn("NOT backing up database while a file already exists"); resolve(true);