Content-Length: 256774 | pFad | https://github.com/interactions-py/interactions.py/issues/1775

23 docs: Live Patching · Issue #1775 · interactions-py/interactions.py · GitHub
Skip to content

docs: Live Patching #1775

Open
Open
@andyad8865

Description

@andyad8865

Page

Live Patching : /Guides/22 Live Patching/

Problem description

If the command is not placed at the bottom of the script, and is placed at the top jurigged will throw and error

Jurigged encountered an error
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/jurigged/codetools.py", line 533, in _process_child_correspondence
    orig.apply_correspondence(
  File "/usr/local/lib/python3.10/site-packages/jurigged/codetools.py", line 744, in apply_correspondence
    new_obj = self.reevaluate(corr.new.node, glb)
  File "/usr/local/lib/python3.10/site-packages/jurigged/codetools.py", line 845, in reevaluate
    raise Exception(
Exception: Cannot find existing object for replacement of 'command_function'.

Suggested changes

indicate in the guide that bot.load_extension("interactions.ext.jurigged") needs to be below your code but above the bot.start() line e.g.

import interactions

bot = interactions.Client()

@interactions.listen()
async def on_startup():
    print("Bot is ready!")

#allow code hot reloading in Python
bot.load_extension("interactions.ext.jurigged")  

bot.start("token")

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/interactions-py/interactions.py/issues/1775

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy