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:
|
||||
pass
|
||||
|
||||
# Make modifications for it to work on windows
|
||||
if babase.app.classic.platform == "windows":
|
||||
with open(Path(f"{getcwd()}/ba_data/python/pypresence/utils.py"), "r") as file:
|
||||
data = file.readlines()
|
||||
data[45] = """
|
||||
# Make modifications for it to work on windows
|
||||
if babase.app.classic.platform == "windows":
|
||||
with open(Path(f"{getcwd()}/ba_data/python/pypresence/utils.py"), "r") as file:
|
||||
data = file.readlines()
|
||||
data[45] = """
|
||||
def get_event_loop(force_fresh=False):
|
||||
loop = asyncio.ProactorEventLoop() if sys.platform == 'win32' else asyncio.new_event_loop()
|
||||
if force_fresh:
|
||||
|
|
@ -250,11 +250,11 @@ def get_event_loop(force_fresh=False):
|
|||
return running
|
||||
else:
|
||||
return loop"""
|
||||
|
||||
with open(Path(f"{getcwd()}/ba_data/python/pypresence/utils.py"), "w") as file:
|
||||
for number, line in enumerate(data):
|
||||
if number not in range(46, 56):
|
||||
file.write(line)
|
||||
|
||||
with open(Path(f"{getcwd()}/ba_data/python/pypresence/utils.py"), "w") as file:
|
||||
for number, line in enumerate(data):
|
||||
if number not in range(46, 56):
|
||||
file.write(line)
|
||||
get_module()
|
||||
|
||||
from pypresence import PipeClosed, DiscordError, DiscordNotFound
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue