diff --git a/bot/resources/tags/if-name-main.md b/bot/resources/tags/if-name-main.md index eb43c31f3b..19543c384f 100644 --- a/bot/resources/tags/if-name-main.md +++ b/bot/resources/tags/if-name-main.md @@ -5,7 +5,6 @@ embed: --- This is a convention for code that should run if the file is the main file of your program: - ```py def main(): ... @@ -13,9 +12,6 @@ def main(): if __name__ == "__main__": main() ``` +If the file is run directly, then the `main()` function will be run. If the file is imported, it will not run. -If the file is run directly, then the `main()` function will be run. -If the file is imported, it will not run. - -For more about why you would do this and how it works, see -[`if __name__ == "__main__"`](https://pythondiscord.com/pages/guides/pydis-guides/if-name-main/). +For more about why you would do this and how it works, see [`if __name__ == "__main__"`](https://pythondiscord.com/pages/guides/pydis-guides/if-name-main/).