File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 7
7
"""
8
8
9
9
import json
10
+ import os
10
11
from typing import Callable , TypeVar
11
12
12
13
from discord .ext import commands
@@ -22,7 +23,7 @@ def is_owner() -> Callable[[T], T]:
22
23
This is a custom check to see if the user executing the command is an owner of the bot.
23
24
"""
24
25
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 :
26
27
data = json .load (file )
27
28
if context .author .id not in data ["owners" ]:
28
29
raise UserNotOwner
Original file line number Diff line number Diff line change 10
10
11
11
import aiosqlite
12
12
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"
14
14
15
15
16
16
async def is_blacklisted (user_id : int ) -> bool :
You can’t perform that action at this time.
0 commit comments