Forgot about the type conversion feature

This commit is contained in:
barelyprofessional
2025-05-02 12:42:54 -05:00
parent adf38b9c53
commit dd0085403e

View File

@@ -51,7 +51,7 @@ public class JuiceCommand : ICommand
{ Amount = amount, User = user, JuicedAt = DateTimeOffset.UtcNow }, ctx); { Amount = amount, User = user, JuicedAt = DateTimeOffset.UtcNow }, ctx);
await db.SaveChangesAsync(ctx); await db.SaveChangesAsync(ctx);
if (juicerSettings[BuiltIn.Keys.JuiceAutoDeleteMsgDelay].Value == null) return; if (juicerSettings[BuiltIn.Keys.JuiceAutoDeleteMsgDelay].Value == null) return;
var delay = int.Parse(juicerSettings[BuiltIn.Keys.JuiceAutoDeleteMsgDelay].Value!); var delay = juicerSettings[BuiltIn.Keys.JuiceAutoDeleteMsgDelay].ToType<int>();
if (delay <= 0) return; if (delay <= 0) return;
while (sentMsg.ChatMessageId == null) while (sentMsg.ChatMessageId == null)
{ {