Skip to content

Commit dc2cd2b

Browse files
committed
Lintin
1 parent 31f1c84 commit dc2cd2b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

backend/src/common/pollingScheduler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ async function poll<T>(state: State<T>): Promise<void> {
7373
setRunTimeout(state, task);
7474
}
7575

76-
async function setRunTimeout<T>(state: State<T>, task: T) {
76+
function setRunTimeout<T>(state: State<T>, task: T): void {
7777
const delay = Math.max(0, state.options.getTimestamp(task).getTime() - Date.now());
7878

7979
logger.debug?.(`Setting up timeout for #${state.options.discriminator} task ${state.options.debugFormat(task)} with delay ${delay}`);

backend/src/plugin/moderation/tempBanScheduler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let scheduler: PollingSchedulerHandle<TempBan> | null = null;
1212

1313
export default [onBotInit(beginPollingTempBans)];
1414

15-
function debugFormatTempBan(tempBan: TempBan) {
15+
function debugFormatTempBan(tempBan: TempBan): string {
1616
return `temp ban for @${tempBan.targetID} in ${debugFormatGuildByID(tempBan.guildID)}`;
1717
}
1818

@@ -38,7 +38,7 @@ export function trackNewTempBan(tempBan: TempBan): void {
3838
scheduler?.track(tempBan);
3939
}
4040

41-
export function untrackTempBan(guildID: string, targetID: string) {
41+
export function untrackTempBan(guildID: string, targetID: string): string {
4242
scheduler?.untrack(getTempBanKey(guildID, targetID));
4343
}
4444

@@ -52,7 +52,7 @@ async function trigger(ban: TempBan): Promise<void> {
5252

5353
try {
5454
logger.debug?.(`Lifting expired ban of ${ban.targetID} in ${debugFormatGuild(guild)}`)
55-
guild.removeBan(ban.targetID, "Ban expired");
55+
await guild.removeBan(ban.targetID, "Ban expired");
5656
} catch (error) {
5757
if (!(error instanceof DiscordRESTError))
5858
throw error;

0 commit comments

Comments
 (0)