Automatically confirm update if it was initiated via the button in update notifier

pull/1/head
Hikari 2022-04-14 09:25:26 +00:00
parent df3c684a43
commit c98a9f610b
No known key found for this signature in database
GPG Key ID: 5FA52ACBB2AD964D
2 changed files with 2 additions and 2 deletions

View File

@ -170,7 +170,7 @@ class UpdateNotifierMod(loader.Module):
m = await self._client.send_message(
self.inline.bot_username,
"<code>.update</code>",
"<code>.update --force</code>",
)
await self.inline.bot.delete_message(

View File

@ -180,7 +180,7 @@ class UpdaterMod(loader.Module):
@loader.owner
async def updatecmd(self, message: Message) -> None:
"""Downloads userbot updates"""
if self.inline.init_complete and await self.inline.form(
if "--force" not in (utils.get_args_raw(message) or "") and self.inline.init_complete and await self.inline.form(
message=message,
text=self.strings(
"update_confirm",