File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 77"""
88
99import json
10+ import os
1011from typing import Callable , TypeVar
1112
1213from discord .ext import commands
@@ -22,7 +23,7 @@ def is_owner() -> Callable[[T], T]:
2223 This is a custom check to see if the user executing the command is an owner of the bot.
2324 """
2425 async def predicate (context : commands .Context ) -> bool :
25- with open (" config.json" ) as file :
26+ with open (f" { os . path . realpath ( os . path . dirname ( __file__ )) } /../ config.json" ) as file :
2627 data = json .load (file )
2728 if context .author .id not in data ["owners" ]:
2829 raise UserNotOwner
Original file line number Diff line number Diff line change 1010
1111import aiosqlite
1212
13- DATABASE_PATH = f"{ os .path .realpath (os .path .dirname (__file__ ))} /database/database.db"
13+ DATABASE_PATH = f"{ os .path .realpath (os .path .dirname (__file__ ))} /../ database/database.db"
1414
1515
1616async def is_blacklisted (user_id : int ) -> bool :
You can’t perform that action at this time.
0 commit comments