Skip to content

Commit

Permalink
fix: correcting some incomplete code
Browse files Browse the repository at this point in the history
  • Loading branch information
Kavuti committed Mar 13, 2024
1 parent 2613061 commit 870a2e5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from dotenv import load_dotenv
import os

load_dotenv()

logging.basicConfig(format="%(asctime)s %(levelname)s:%(name)s - %(message)s")
logger = logging.getLogger("obsidian-bot")
logger.setLevel(logging.INFO)
Expand All @@ -14,11 +16,11 @@
app = Client(
"obsidian-bot",
api_id=os.getenv("TG_API_ID"),
api_hash=bot_secret["TG_API_HASH"],
bot_token=bot_secret["TG_BOT_TOKEN"],
api_hash=os.getenv("TG_API_HASH"),
bot_token=os.getenv("TG_BOT_TOKEN"),
)

@app.on_message(filters.user(bot_secret["TG_MY_ID"]) & filters.text)
@app.on_message(filters.user(os.getenv("TG_MY_ID")) & filters.text)
async def handle_message(client, message):
logger.info(f"Saving new note")
note = create_note(message.text)
Expand Down

0 comments on commit 870a2e5

Please sign in to comment.