Only log deleted messages if they were found previously
This commit is contained in:
parent
a674b98c80
commit
3103df856c
@ -223,8 +223,7 @@ namespace PluralKit {
|
|||||||
|
|
||||||
public async Task Delete(ulong id) {
|
public async Task Delete(ulong id) {
|
||||||
using (var conn = await _conn.Obtain())
|
using (var conn = await _conn.Obtain())
|
||||||
await conn.ExecuteAsync("delete from messages where mid = @Id", new { Id = id });
|
if (await conn.ExecuteAsync("delete from messages where mid = @Id", new { Id = id }) > 0)
|
||||||
|
|
||||||
_logger.Information("Deleted message {Message}", id);
|
_logger.Information("Deleted message {Message}", id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user