mirror of
https://github.com/yawaflua/PL_JusticeBot.git
synced 2025-12-10 04:19:31 +02:00
add notary module, utilities and server online in bot`s game
This commit is contained in:
@@ -1,13 +1,20 @@
|
||||
namespace DiscordApp.Utilities
|
||||
using DiscordApp.Database.Tables;
|
||||
|
||||
namespace DiscordApp.Utilities
|
||||
{
|
||||
public class IdChecker
|
||||
public class Utilities
|
||||
{
|
||||
public static void IdLenghtIsLower(out int id)
|
||||
public static void IdGenerator(out int id)
|
||||
{
|
||||
Random random = new();
|
||||
id = random.Next(00001, 99999);
|
||||
while (id.ToString().Length < 5) { id = random.Next(00001, 99999); }
|
||||
return;
|
||||
}
|
||||
public static bool IsPassport(int id, out Passport passport)
|
||||
{
|
||||
passport = Startup.appDbContext.Passport.FirstOrDefault(x => x.Id == id);
|
||||
return passport == null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user