Skip to content

Commit eccc1ba

Browse files
committed
Fix Beacon and driver issues
1 parent 5e26927 commit eccc1ba

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

shinobu/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def read(self, filename: str) -> str:
318318
return secrets_authority.read(self, filename)
319319

320320
def read_json(self, filename: str) -> dict:
321-
return orjson.loads(secrets_authority.read(self, filename))
321+
return orjson.loads(secrets_authority.read(self, filename) or "{}")
322322

323323
def save(self, filename: str, data: str):
324324
# This operation can take a very long time (at least a few hundred milliseconds)!

shinobu/beacon/discord/parent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(self, bot):
3636
self.beacon: beacon.Beacon = self.bot.shared_objects.get("beacon")
3737

3838
# Check if driver is already initialized
39-
if "discord" in self.beacon.drivers:
39+
if "discord" in self.beacon.drivers.platforms:
4040
return
4141

4242
# Register driver

shinobu/beacon/protocol/beacon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(self, bot: bridge.Bot, files_wrapper: fine_grained.FineGrainedSecur
5151
self._filters: beacon_filters.BeaconFilterManager = beacon_filters.BeaconFilterManager()
5252

5353
# Get data
54-
self._data: dict = self.__wrapper.read_json("bridge")
54+
self._data: dict = self.__wrapper.read_json("beacon")
5555

5656
# Create aiomultiprocess pool if available and enabled
5757
self._pool: aiomultiprocess.Pool | None = None

0 commit comments

Comments
 (0)