fix embed queue
This commit is contained in:
parent
ded4f4db26
commit
8d4a7b1729
13 changed files with 188 additions and 32 deletions
|
|
@ -21,7 +21,9 @@ public class MessageRepository(ILogger logger, DatabaseContext db, IEncryptionSe
|
|||
ChannelId = msg.ChannelID.ToUlong(),
|
||||
GuildId = msg.GuildID.ToUlong(),
|
||||
|
||||
EncryptedContent = await Task.Run(() => encryptionService.Encrypt(msg.Content), ct),
|
||||
EncryptedContent =
|
||||
await Task.Run(
|
||||
() => encryptionService.Encrypt(string.IsNullOrWhiteSpace(msg.Content) ? "None" : msg.Content), ct),
|
||||
EncryptedUsername = await Task.Run(() => encryptionService.Encrypt(msg.Author.Tag()), ct),
|
||||
AttachmentSize = msg.Attachments.Select(a => a.Size).Sum()
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public static class QueryExtensions
|
|||
CancellationToken ct = default)
|
||||
{
|
||||
var guild = await db.Guilds.FindAsync(id);
|
||||
if (guild == null) throw new Exception("oh");
|
||||
if (guild == null) throw new CataloggerError("Guild not found, was not initialized during guild create");
|
||||
return guild;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue