feat: delete command messages with pk;msg -delete

This commit is contained in:
spiral
2021-09-26 22:49:43 -04:00
parent fa66fbe247
commit 0517c76abf
6 changed files with 48 additions and 11 deletions

View File

@@ -25,10 +25,10 @@ namespace PluralKit.Bot
_logger = logger.ForContext<CommandMessageService>();
}
public async Task RegisterMessage(ulong messageId, ulong authorId)
public async Task RegisterMessage(ulong messageId, ulong channelId, ulong authorId)
{
_logger.Debug("Registering command response {MessageId} from author {AuthorId}", messageId, authorId);
await _db.Execute(conn => _repo.SaveCommandMessage(conn, messageId, authorId));
_logger.Debug("Registering command response {MessageId} from author {AuthorId} in {ChannelId}", messageId, authorId, channelId);
await _db.Execute(conn => _repo.SaveCommandMessage(conn, messageId, channelId, authorId));
}
public async Task<CommandMessage?> GetCommandMessage(IPKConnection conn, ulong messageId)