fix: disconnect all shards when shard manager restarts, don't fetch old timeouts
This commit is contained in:
parent
492283b9c1
commit
0564206bf7
2 changed files with 19 additions and 2 deletions
|
|
@ -20,7 +20,11 @@ public class TimeoutRepository(DatabaseConnection conn) : IDisposable, IAsyncDis
|
|||
);
|
||||
|
||||
public async Task<List<DiscordTimeout>> GetAllAsync() =>
|
||||
(await conn.QueryAsync<DiscordTimeout>("select * from timeouts order by id")).ToList();
|
||||
(
|
||||
await conn.QueryAsync<DiscordTimeout>(
|
||||
"select * from timeouts where until > now() order by id"
|
||||
)
|
||||
).ToList();
|
||||
|
||||
public async Task<DiscordTimeout> SetAsync(
|
||||
Snowflake guildId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue