Attempt to install dependencies from error message if they are not specified in code

pull/1/head
hikari.ftg 2022-04-07 13:27:33 +00:00
parent 737dfd8343
commit 3cf750a586
2 changed files with 5 additions and 1 deletions

View File

@ -73,6 +73,9 @@ class HikkaDLMod(loader.Module):
await wss.send("🚫 Origin is not allowed")
continue
# Modules' creators spend so much time to create cool modules
# so this code part is a little propriety gesture. Send a ❤
# to a message with a link to currently downloading module
try:
await self._client(
SendReactionRequest(

View File

@ -463,7 +463,8 @@ class LoaderMod(loader.Module):
)
)
except TypeError:
raise Exception("No valid pip packages specified in code") from e
logger.warning("No valid pip packages specified in code, attemping installation from error")
requirements = [e.name]
logger.debug("Installing requirements: %r", requirements)