diff options
Diffstat (limited to 'bot')
-rw-r--r-- | bot/exts/core/error_handler.py | 4 | ||||
-rw-r--r-- | bot/exts/events/trivianight/trivianight.py | 2 | ||||
-rw-r--r-- | bot/exts/fun/duck_game.py | 2 | ||||
-rw-r--r-- | bot/exts/fun/snakes/_utils.py | 2 | ||||
-rw-r--r-- | bot/utils/pagination.py | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/bot/exts/core/error_handler.py b/bot/exts/core/error_handler.py index 62dee53c..81b923fd 100644 --- a/bot/exts/core/error_handler.py +++ b/bot/exts/core/error_handler.py @@ -59,7 +59,7 @@ class CommandErrorHandler(commands.Cog): error = getattr(error, "original", error) logging.debug( - f"Error Encountered: {type(error).__name__} - {str(error)}, " + f"Error Encountered: {type(error).__name__} - {error!s}, " f"Command: {ctx.command}, " f"Author: {ctx.author}, " f"Channel: {ctx.channel}" @@ -156,7 +156,7 @@ class CommandErrorHandler(commands.Cog): if ctx.guild is not None: scope.set_extra("jump_to", ctx.message.jump_url) - log.exception(f"Unhandled command error: {str(error)}", exc_info=error) + log.exception(f"Unhandled command error: {error!s}", exc_info=error) async def send_command_suggestion(self, ctx: commands.Context, command_name: str) -> None: """Sends user similar commands if any can be found.""" diff --git a/bot/exts/events/trivianight/trivianight.py b/bot/exts/events/trivianight/trivianight.py index f90d32e0..e0db45d8 100644 --- a/bot/exts/events/trivianight/trivianight.py +++ b/bot/exts/events/trivianight/trivianight.py @@ -90,7 +90,7 @@ class TriviaNightCog(commands.Cog): try: serialized_json = loads(json_text) except JSONDecodeError as error: - raise commands.BadArgument(f"Looks like something went wrong:\n{str(error)}") + raise commands.BadArgument(f"Looks like something went wrong:\n{error!s}") self.game = TriviaNightGame(serialized_json) self.question_closed = asyncio.Event() diff --git a/bot/exts/fun/duck_game.py b/bot/exts/fun/duck_game.py index 3f34ece7..fbdc9ea2 100644 --- a/bot/exts/fun/duck_game.py +++ b/bot/exts/fun/duck_game.py @@ -248,7 +248,7 @@ class DuckGamesDirector(commands.Cog): if answer in game.solutions: game.claimed_answers[answer] = msg.author game.scores[msg.author] += CORRECT_SOLN - await self.append_to_found_embed(game, f"{str(answer):12s} - {msg.author.display_name}") + await self.append_to_found_embed(game, f"{answer!s:12s} - {msg.author.display_name}") else: await msg.add_reaction(EMOJI_WRONG) game.scores[msg.author] += INCORRECT_SOLN diff --git a/bot/exts/fun/snakes/_utils.py b/bot/exts/fun/snakes/_utils.py index 5332cde2..ffffcd34 100644 --- a/bot/exts/fun/snakes/_utils.py +++ b/bot/exts/fun/snakes/_utils.py @@ -489,7 +489,7 @@ class SnakeAndLaddersGame: await self.channel.send( f"**Snakes and Ladders**: {user.mention} has joined the game.\n" - f"There are now {str(len(self.players))} players in the game.", + f"There are now {len(self.players)!s} players in the game.", delete_after=10 ) diff --git a/bot/utils/pagination.py b/bot/utils/pagination.py index df0eb942..ef3186d0 100644 --- a/bot/utils/pagination.py +++ b/bot/utils/pagination.py @@ -190,7 +190,7 @@ class LinePaginator(Paginator): for emoji in PAGINATION_EMOJI: # Add all the applicable emoji to the message - log.trace(f"Adding reaction: {repr(emoji)}") + log.trace(f"Adding reaction: {emoji!r}") await message.add_reaction(emoji) while True: |