Skip to content

[BUG]: Updating or reloading plugins does not reload imported files. #3223

Closed
@Jerrie-Aries

Description

@Jerrie-Aries

Bot Version

v4.0.1

How are you hosting Modmail?

Other

Error Logs

None

Screenshots

No response

Additional Information

This only occurs on plugins that use multiple files.
More in-depth explanations can be found on discord.py discussions, here.

This happened to me quite a few times now since most of my plugins use multiple files. Updating the plugins does not re-import other files in same directory or sub-directories.

Steps to produce:

  • Create a plugin with multiple files. Example:
    ├── plugin_folder
    │ ├── plugin.py
    │ ├── views.py
  • Make a change in views.py.
  • Update the plugin using ?plugin update ... command. The changes in views.py do not take affect (at least until bot restart). If new attributes were added in a class in views.py, accessing it from plugin.py would raise AttributeError.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis is a confirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions