Skip to content

Commit

Permalink
Update var.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRizoel authored Dec 20, 2022
1 parent 2a96efd commit 0cbda9b
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions var.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
from decouple import config
from heroku3 import from_key
from os import getenv
import os
from dotenv import load_dotenv

if os.path.exists(".env"):
load_dotenv(".env")

def make_int(str_input):
str_list = str_input.split(" ")
int_list = []
for x in str_list:
int_list.append(int(x))
return int_list

class Var:
API_ID = config("API_ID", default=6, cast=int)
API_HASH = config("API_HASH", None)
BOT_TOKEN = config("BOT_TOKEN", None)
SUDO = list(map(int, getenv("SUDO").split()))
API_ID = int(os.getenv("API_ID", ""))
API_HASH = os.getenv("API_HASH", "")
BOT_TOKEN = os.getenv("BOT_TOKEN", "")
sudo = os.getenv("SUDO")
SUDO = []
if sudo:
SUDO = make_int(sudo)

0 comments on commit 0cbda9b

Please sign in to comment.