File tree 3 files changed +12
-4
lines changed
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ def load_from_file(self) -> None:
19
19
except FileNotFoundError :
20
20
self ._config = {}
21
21
22
+ @property
23
+ def rodhaj (self ) -> _T :
24
+ return self ._config .get ("rodhaj" , {})
25
+
22
26
@overload
23
27
def get (self , key : Any ) -> Optional [Union [_T , Any ]]:
24
28
...
Original file line number Diff line number Diff line change 10
10
import asyncpg
11
11
import click
12
12
from libs .utils .config import RodhajConfig
13
- from typing_extensions import Self
14
13
15
- path = Path (__file__ ).parent / "config.json"
14
+ try :
15
+ from typing import Self
16
+ except ImportError :
17
+ from typing_extensions import Self
18
+
19
+ path = Path (__file__ ).parent / "config.yml"
16
20
config = RodhajConfig (path )
17
21
18
22
BE = TypeVar ("BE" , bound = BaseException )
Original file line number Diff line number Diff line change @@ -57,10 +57,10 @@ def __init__(
57
57
self .partial_config : Optional [PartialConfig ] = None
58
58
self .pool = pool
59
59
self .version = str (VERSION )
60
- self .transprogrammer_guild_id = config [ " rodhaj" ] .get (
60
+ self .transprogrammer_guild_id = config . rodhaj .get (
61
61
"guild_id" , 1183302385020436480
62
62
)
63
- self ._dev_mode = config [ " rodhaj" ] .get ("dev_mode" , False )
63
+ self ._dev_mode = config . rodhaj .get ("dev_mode" , False )
64
64
self ._reloader = Reloader (self , Path (__file__ ).parent )
65
65
66
66
### Ticket related utils
You can’t perform that action at this time.
0 commit comments