Skip to content

Additional Arguments on Name #9

@abhinavkakku

Description

@abhinavkakku

This always throws error - update.edit(custom_caption.format(file_name=motech.file_name, mote))

that mote argument cannot be found anywhere

def edit_caption(bot, update: pyrogram.types.Message):
  if os.environ.get("custom_caption"):
      motech, _ = get_file_details(update)
      try:
          try: update.edit(custom_caption.format(file_name=motech.file_name))
          except pyrogram.errors.FloodWait as FloodWait:
              asyncio.sleep(FloodWait.value)
              update.edit(custom_caption.format(file_name=motech.file_name, mote))
      except pyrogram.errors.MessageNotModified: pass 
  else:
      return

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions