diff options
author | 2021-05-05 12:10:18 -0400 | |
---|---|---|
committer | 2021-05-05 12:10:18 -0400 | |
commit | 6ae760663b7055f9b74089591b4f46ac75c6f8e5 (patch) | |
tree | fe0856fa9181efda3a75a565e9e72953f32543e9 | |
parent | chore: Replace the remaining double quotes with double quotes (diff) |
chore: Don't have defaults for typing.Optional[...] in commands
-rw-r--r-- | bot/exts/evergreen/game.py | 2 | ||||
-rw-r--r-- | bot/exts/evergreen/space.py | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/bot/exts/evergreen/game.py b/bot/exts/evergreen/game.py index f3d4e9a2..4da33259 100644 --- a/bot/exts/evergreen/game.py +++ b/bot/exts/evergreen/game.py @@ -225,7 +225,7 @@ class Games(Cog): self.genres[genre_name] = genre @group(name="games", aliases=["game"], invoke_without_command=True) - async def games(self, ctx: Context, amount: Optional[int] = 5, *, genre: Optional[str] = None) -> None: + async def games(self, ctx: Context, amount: Optional[int] = 5, *, genre: Optional[str]) -> None: """ Get random game(s) by genre from IGDB. Use .games genres command to get all available genres. diff --git a/bot/exts/evergreen/space.py b/bot/exts/evergreen/space.py index ee9ad38c..7d83dbfb 100644 --- a/bot/exts/evergreen/space.py +++ b/bot/exts/evergreen/space.py @@ -66,7 +66,7 @@ class Space(Cog): await invoke_help_command(ctx) @space.command(name="apod") - async def apod(self, ctx: Context, date: Optional[str] = None) -> None: + async def apod(self, ctx: Context, date: Optional[str]) -> None: """ Get Astronomy Picture of Day from NASA API. Date is optional parameter, what formatting is YYYY-MM-DD. @@ -99,7 +99,7 @@ class Space(Cog): ) @space.command(name="nasa") - async def nasa(self, ctx: Context, *, search_term: Optional[str] = None) -> None: + async def nasa(self, ctx: Context, *, search_term: Optional[str]) -> None: """Get random NASA information/facts + image. Support `search_term` parameter for more specific search.""" params = { "media_type": "image" @@ -124,7 +124,7 @@ class Space(Cog): ) @space.command(name="epic") - async def epic(self, ctx: Context, date: Optional[str] = None) -> None: + async def epic(self, ctx: Context, date: Optional[str]) -> None: """Get one of latest random image of earth from NASA EPIC API. Support date parameter, format is YYYY-MM-DD.""" if date: try: @@ -160,8 +160,8 @@ class Space(Cog): async def mars( self, ctx: Context, - date: Optional[DateConverter] = None, - rover: Optional[str] = "curiosity" + date: Optional[DateConverter], + rover: str = "curiosity" ) -> None: """ Get random Mars image by date. Support both SOL (martian solar day) and earth date and rovers. |