minor bugfixes
This commit is contained in:
parent
f7a43d322a
commit
8a55a50017
|
@ -1335,6 +1335,10 @@ class ActivityLogger(commands.Cog):
|
|||
return handle
|
||||
|
||||
def should_log(self, location):
|
||||
if not self.cache:
|
||||
# cache is empty, still booting
|
||||
return False
|
||||
|
||||
if self.cache.get("everything", False):
|
||||
return True
|
||||
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
"description": "Manipulates images.",
|
||||
"hidden": false,
|
||||
"end_user_data_statement": "This cog does not store user data.",
|
||||
"dependencies": ["Wand"]
|
||||
}
|
||||
"requirements": ["wand"]
|
||||
}
|
||||
|
|
|
@ -35,7 +35,13 @@ class ScriptGen(commands.Cog):
|
|||
config_path = os.path.join(cog_data_path(cog_instance=self), "config.json")
|
||||
if os.path.isfile(model_path) and os.path.isfile(config_path):
|
||||
use_gpu = await self.config.use_gpu()
|
||||
self.model = aitextgen(model=model_path, config=config_path, use_gpu=use_gpu)
|
||||
self.model = aitextgen(model_folder=cog_data_path(cog_instance=self), use_gpu=use_gpu)
|
||||
else:
|
||||
await self.bot.send_to_owners(
|
||||
error(
|
||||
"Your model for cog `scriptgen` could not be found. Make sure to have two files, `pytorch_model.bin` and `config.json` in the cog's data directory."
|
||||
)
|
||||
)
|
||||
|
||||
if await self.config.use_lock():
|
||||
self.lock = False
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
{
|
||||
"author": [
|
||||
"Brandons209",
|
||||
"Brandons209"
|
||||
],
|
||||
"description": "Timehelper provides commands for users to easily get discord formatted timestamps for a specific date or interval, and also compare timezone's times easily.",
|
||||
"hidden": false,
|
||||
"install_msg": "Thanks for using my cog! Use [p]time to get started.",
|
||||
"requirements": ["dateparser", "tzdata"],
|
||||
"requirements": [
|
||||
"dateparser",
|
||||
"tzdata"
|
||||
],
|
||||
"tags": [
|
||||
"brandons209",
|
||||
"timestamp",
|
||||
|
|
Loading…
Reference in New Issue