mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
Update discord_richpresence.py
This commit is contained in:
parent
81abddff28
commit
3c83efcc05
1 changed files with 10 additions and 10 deletions
|
|
@ -227,11 +227,11 @@ if not ANDROID:
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Make modifications for it to work on windows
|
# Make modifications for it to work on windows
|
||||||
if babase.app.classic.platform == "windows":
|
if babase.app.classic.platform == "windows":
|
||||||
with open(Path(f"{getcwd()}/ba_data/python/pypresence/utils.py"), "r") as file:
|
with open(Path(f"{getcwd()}/ba_data/python/pypresence/utils.py"), "r") as file:
|
||||||
data = file.readlines()
|
data = file.readlines()
|
||||||
data[45] = """
|
data[45] = """
|
||||||
def get_event_loop(force_fresh=False):
|
def get_event_loop(force_fresh=False):
|
||||||
loop = asyncio.ProactorEventLoop() if sys.platform == 'win32' else asyncio.new_event_loop()
|
loop = asyncio.ProactorEventLoop() if sys.platform == 'win32' else asyncio.new_event_loop()
|
||||||
if force_fresh:
|
if force_fresh:
|
||||||
|
|
@ -251,10 +251,10 @@ def get_event_loop(force_fresh=False):
|
||||||
else:
|
else:
|
||||||
return loop"""
|
return loop"""
|
||||||
|
|
||||||
with open(Path(f"{getcwd()}/ba_data/python/pypresence/utils.py"), "w") as file:
|
with open(Path(f"{getcwd()}/ba_data/python/pypresence/utils.py"), "w") as file:
|
||||||
for number, line in enumerate(data):
|
for number, line in enumerate(data):
|
||||||
if number not in range(46, 56):
|
if number not in range(46, 56):
|
||||||
file.write(line)
|
file.write(line)
|
||||||
get_module()
|
get_module()
|
||||||
|
|
||||||
from pypresence import PipeClosed, DiscordError, DiscordNotFound
|
from pypresence import PipeClosed, DiscordError, DiscordNotFound
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue