mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-06 09:56:09 +00:00
Use f-strings in more places that were missed.
This commit is contained in:
@ -846,7 +846,7 @@ class BotBase(GroupMixin):
|
||||
raise
|
||||
|
||||
raise TypeError("command_prefix must be plain string, iterable of strings, or callable "
|
||||
"returning either of these, not {}".format(ret.__class__.__name__))
|
||||
f"returning either of these, not {ret.__class__.__name__}")
|
||||
|
||||
if not ret:
|
||||
raise ValueError("Iterable command_prefix must contain at least one prefix")
|
||||
@ -907,13 +907,13 @@ class BotBase(GroupMixin):
|
||||
except TypeError:
|
||||
if not isinstance(prefix, list):
|
||||
raise TypeError("get_prefix must return either a string or a list of string, "
|
||||
"not {}".format(prefix.__class__.__name__))
|
||||
f"not {prefix.__class__.__name__}")
|
||||
|
||||
# It's possible a bad command_prefix got us here.
|
||||
for value in prefix:
|
||||
if not isinstance(value, str):
|
||||
raise TypeError("Iterable command_prefix or list returned from get_prefix must "
|
||||
"contain only strings, not {}".format(value.__class__.__name__))
|
||||
f"contain only strings, not {value.__class__.__name__}")
|
||||
|
||||
# Getting here shouldn't happen
|
||||
raise
|
||||
|
Reference in New Issue
Block a user