Rilliat 2025-01-19 23:50:52 +03:00
parent 2de9c0fb22
commit d4910135f6
1 changed files with 7 additions and 4 deletions

View File

@ -976,16 +976,19 @@ class HerokuConfigMod(loader.Module):
@loader.command(alias="cfg")
async def configcmd(self, message: Message):
args = utils.get_args_raw(message)
if self.lookup(args) and hasattr(self.lookup(args), "config"):
args = utils.get_args_raw(message).split()
if self.lookup(args[0]) and hasattr(self.lookup(args[0]), "config"):
form = await self.inline.form(self.config["cfg_emoji"], message, silent=True)
mod = self.lookup(args)
mod = self.lookup(args[0])
if isinstance(mod, loader.Library):
type_ = "library"
else:
type_ = mod.__origin__.startswith("<core")
await self.inline__configure(form, args, obj_type=type_)
if len(args) == 2 and self.lookup(args[0]).config:
await self.inline__configure_option(form, args[0], args[1], obj_type=type_)
else:
await self.inline__configure(form, args[0], obj_type=type_)
return
await self.inline__choose_category(message)