Code cleanup

This commit is contained in:
Andriy
2023-07-29 15:03:45 +03:00
parent 5e4183acfa
commit a24332370d
36 changed files with 46 additions and 111 deletions
-1
View File
@@ -3,7 +3,6 @@ global using GuessCache = Kruzya.TelegramBot.Core.Cache.MemoryCache<Telegram.Bot
using Kruzya.TelegramBot.Core;
using Kruzya.TelegramBot.Core.Options;
using Microsoft.Extensions.DependencyInjection;
@@ -4,7 +4,6 @@ using System;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using BotFramework;
using Castle.Core.Internal;
using Kruzya.TelegramBot.Core;
using Kruzya.TelegramBot.Core.Data;
using Kruzya.TelegramBot.Core.Extensions;
+1 -1
View File
@@ -44,7 +44,7 @@ public class Guess : CommonHandler
{
ChatId = Chat.Id,
DeleteAt = DateTime.UtcNow.AddSeconds(20),
MessageId = Message.MessageId
MessageId = Message!.MessageId
});
var cooldownOption = await _db.UserValues.FindOrCreateOption(Chat.Id, From.Id, "guessCooldown");
+1 -3
View File
@@ -1,6 +1,4 @@
using Telegram.Bot.Types;
namespace West.Entertainment.Handler;
namespace West.Entertainment.Handler;
public class GuessData
{
+1 -3
View File
@@ -2,7 +2,6 @@
using BotFramework.Enums;
using System.Threading.Tasks;
using System;
using System.Collections.Generic;
using System.Linq;
using Kruzya.TelegramBot.Core;
using Kruzya.TelegramBot.Core.Data;
@@ -14,7 +13,6 @@ using Kruzya.TelegramBot.Core.AutoDelete;
using System.Collections.Concurrent;
using Telegram.Bot.Types.Enums;
using Telegram.Bot.Types;
using Microsoft.AspNetCore.Components.Forms;
using Kruzya.TelegramBot.Core.Handler;
namespace West.Entertainment.Handler;
@@ -46,7 +44,7 @@ public class Roll : CommonHandler
{
ChatId = Chat.Id,
DeleteAt = DateTime.UtcNow.AddSeconds(20),
MessageId = Message.MessageId
MessageId = Message!.MessageId
});
if (cd > DateTime.Now)