Clean up a few database pool uses

This commit is contained in:
Ske
2021-09-03 22:20:07 +02:00
parent 13260a4b0e
commit 9bbe9df16d
5 changed files with 29 additions and 25 deletions

View File

@@ -10,7 +10,7 @@ namespace PluralKit.Core
conn.QueryAsync("insert into command_messages (message_id, author_id) values (@Message, @Author)",
new { Message = messageId, Author = authorId });
public Task<CommandMessage> GetCommandMessage(IPKConnection conn, ulong messageId) =>
public Task<CommandMessage?> GetCommandMessage(IPKConnection conn, ulong messageId) =>
conn.QuerySingleOrDefaultAsync<CommandMessage>("select * from command_messages where message_id = @Message",
new { Message = messageId });