Skip to content

Commit eb80fed

Browse files
committed
Fix errors on windows selfhost
1 parent 53ae48c commit eb80fed

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

bot.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,13 @@ def uptime(self) -> str:
8989

9090
def startup(self):
9191
logger.line()
92-
logger.info("┌┬┐┌─┐┌┬┐┌┬┐┌─┐┬┬")
93-
logger.info("││││ │ │││││├─┤││")
94-
logger.info("┴ ┴└─┘─┴┘┴ ┴┴ ┴┴┴─┘")
92+
if os.name != 'nt':
93+
logger.info("┌┬┐┌─┐┌┬┐┌┬┐┌─┐┬┬")
94+
logger.info("││││ │ │││││├─┤││")
95+
logger.info("┴ ┴└─┘─┴┘┴ ┴┴ ┴┴┴─┘")
96+
else:
97+
logger.info("MODMAIL")
98+
logger.info("MODMAIL")
9599
logger.info("v%s", __version__)
96100
logger.info("Authors: kyb3r, fourjr, Taaku18")
97101
logger.line()

cogs/plugins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ async def load_plugin(self, plugin):
199199
venv = hasattr(sys, "real_prefix") or hasattr(sys, "base_prefix") # in a virtual env
200200
user_install = " --user" if not venv else ""
201201
proc = await asyncio.create_subprocess_shell(
202-
f"{sys.executable} -m pip install --upgrade{user_install} -r {req_txt} -q -q",
202+
f"\"{sys.executable}\" -m pip install --upgrade{user_install} -r {req_txt} -q -q --user",
203203
stderr=PIPE,
204204
stdout=PIPE,
205205
)
@@ -497,7 +497,7 @@ async def plugins_reset(self, ctx):
497497
logger.warning("Removing %s.", entry.name)
498498

499499
embed = discord.Embed(
500-
description=f"Successfully purged all plugins from the bot.", color=self.bot.main_color
500+
description="Successfully purged all plugins from the bot.", color=self.bot.main_color
501501
)
502502
return await ctx.send(embed=embed)
503503

0 commit comments

Comments
 (0)