diff options
| author | Bryan Forbes <[email protected]> | 2021-02-28 22:33:18 -0600 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-02-28 23:33:18 -0500 |
| commit | c325918ae64ea21a6f34f4ed4cb028571807641f (patch) | |
| tree | 7c198e7e6da292786999c488ccbd8287e99938ec | |
| parent | Update permission class methods to match Discord UI (diff) | |
| download | discord.py-c325918ae64ea21a6f34f4ed4cb028571807641f.tar.xz discord.py-c325918ae64ea21a6f34f4ed4cb028571807641f.zip | |
Only run main() if the module is being executed as a script
| -rw-r--r-- | discord/__main__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/__main__.py b/discord/__main__.py index 02803cf0..92528354 100644 --- a/discord/__main__.py +++ b/discord/__main__.py @@ -301,4 +301,5 @@ def main(): parser, args = parse_args() args.func(parser, args) -main() +if __name__ == '__main__': + main() |