File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff 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 } ` ) ;
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ let scheduler: PollingSchedulerHandle<TempBan> | null = null;
1212
1313export 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 ;
You can’t perform that action at this time.
0 commit comments