ntcn
This commit is contained in:
parent
47bc647d7f
commit
443bb25eb2
10
Program.cs
10
Program.cs
@ -21,6 +21,8 @@ class Program
|
||||
private static Dictionary<long, string> adminFullNames = new Dictionary<long, string>();
|
||||
private static HashSet<long> superAdmins = new HashSet<long>(); // Хранение списка суперпользователей
|
||||
private static string superAdminPassword = "superadmin123"; // Пароль для суперпользователя
|
||||
private static string _databasePath = Environment.GetEnvironmentVariable("DATABASE_PATH") ?? "bot.db";
|
||||
|
||||
|
||||
|
||||
static async Task Main()
|
||||
@ -159,7 +161,7 @@ class Program
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var connection = new SqliteConnection("Data Source=bot.db"))
|
||||
using (var connection = new SqliteConnection($"Data Source={_databasePath}"))
|
||||
{
|
||||
await connection.OpenAsync();
|
||||
var command = connection.CreateCommand();
|
||||
@ -1758,7 +1760,7 @@ class Program
|
||||
|
||||
try
|
||||
{
|
||||
using (var connection = new SqliteConnection(connectionString))
|
||||
using (var connection = new SqliteConnection($"Data Source={_databasePath}"))
|
||||
{
|
||||
await connection.OpenAsync();
|
||||
|
||||
@ -1863,7 +1865,7 @@ class Program
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var connection = new SqliteConnection("Data Source=bot.db"))
|
||||
using (var connection = new SqliteConnection($"Data Source={_databasePath}"))
|
||||
{
|
||||
await connection.OpenAsync();
|
||||
var command = connection.CreateCommand();
|
||||
@ -1974,7 +1976,7 @@ class Program
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var connection = new SqliteConnection("Data Source=bot.db"))
|
||||
using (var connection = new SqliteConnection($"Data Source={_databasePath}"))
|
||||
{
|
||||
await connection.OpenAsync();
|
||||
var command = connection.CreateCommand();
|
||||
|
Loading…
x
Reference in New Issue
Block a user