Code cleanup

This commit is contained in:
2022-01-22 17:13:38 +03:00
parent 401f9fb529
commit ff63d6dfaa
13 changed files with 232 additions and 138 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ namespace West.TelegramBot.ChatManagement.Handler
var opt = await Db.UserValues.FindOrCreateOption(Chat.Id, "rulesMsgId");
opt.SetValue(replyToMessage.MessageId);
Db.MarkAsModified(opt);
Db.Update(opt);
}
[Command(InChat.Public, "rules", CommandParseMode.Both)]
@@ -37,7 +37,7 @@ namespace West.TelegramBot.ChatManagement.Handler
}
catch (ApiRequestException)
{
Db.MarkAsDeleted(opt);
Db.UserValues.Remove(opt);
throw;
}
}