Skip to content

Commit 3b8a2e3

Browse files
committed
fix: Relative path
1 parent 9997176 commit 3b8a2e3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

helpers/checks.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"""
88

99
import json
10+
import os
1011
from typing import Callable, TypeVar
1112

1213
from 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

helpers/db_manager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import 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

1616
async def is_blacklisted(user_id: int) -> bool:

0 commit comments

Comments
 (0)