Skip to content

Commit

Permalink
renamed creds -> config
Browse files Browse the repository at this point in the history
  • Loading branch information
alenpaulvarghese committed Aug 17, 2021
1 parent 41a770b commit f83e8c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion creds.py → config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os


class my:
class Config:
BOT_TOKEN = os.environ["BOT_TOKEN"] # from @botfather
API_ID = int(os.environ["API_ID"]) # from https://my.telegram.org/apps
API_HASH = os.environ["API_HASH"] # from https://my.telegram.org/apps
Expand Down
8 changes: 4 additions & 4 deletions pdfbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pyrogram import Client
from typing import Optional
from logger import logging
from creds import my
from config import Config
import yaml

_LOG = logging.getLogger(__name__)
Expand All @@ -13,9 +13,9 @@ class Pdfbot(Client):
def __init__(self):
super().__init__(
session_name="pdf-bot",
bot_token=my.BOT_TOKEN,
api_id=my.API_ID,
api_hash=my.API_HASH,
bot_token=Config.BOT_TOKEN,
api_id=Config.API_ID,
api_hash=Config.API_HASH,
plugins=dict(root="plugins"),
)
self.process_pool = Worker()
Expand Down

0 comments on commit f83e8c5

Please sign in to comment.