From 9b0e2711f15ed2e1aa5c080a716b0e9f1691dbd6 Mon Sep 17 00:00:00 2001 From: RohanJnr Date: Wed, 17 May 2023 00:58:11 +0530 Subject: correct return type annotation for get_launch_time_str function --- .../apps/content/resources/guides/python-guides/subclassing_bot.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pydis_site/apps/content/resources/guides/python-guides/subclassing_bot.md b/pydis_site/apps/content/resources/guides/python-guides/subclassing_bot.md index 47186e3d..1be6e485 100644 --- a/pydis_site/apps/content/resources/guides/python-guides/subclassing_bot.md +++ b/pydis_site/apps/content/resources/guides/python-guides/subclassing_bot.md @@ -27,7 +27,7 @@ class CustomBot(commands.Bot): await super().start(*args, **kwargs) # Example of a custom bot method - def get_launch_time_str(self) -> datetime.datetime: + def get_launch_time_str(self) -> str: """Get bot launch datetime without milliseconds in UTC and status.""" return f"Bot started at: {self.launch_time.strftime('%F %T')} UTC." @@ -56,3 +56,4 @@ token = YOUR_TOKEN_HERE bot.run(token) ``` With the above example, you are not required to change any of the existing or future code, it is identical to code done without subclassing bot. +ty \ No newline at end of file -- cgit v1.2.3