aboutsummaryrefslogtreecommitdiff
path: root/discord/mentions.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-04-08 06:02:47 -0400
committerRapptz <[email protected]>2021-04-08 06:02:47 -0400
commit99fc9505107183faa59aad9e7753f293eba88836 (patch)
treef615ac678c5dc194fd2aa3a9a048a188b761b0d9 /discord/mentions.py
parentUpdate joined command in basic_bot to use f-strings (diff)
downloaddiscord.py-99fc9505107183faa59aad9e7753f293eba88836.tar.xz
discord.py-99fc9505107183faa59aad9e7753f293eba88836.zip
Use f-strings in more places that were missed.
Diffstat (limited to 'discord/mentions.py')
-rw-r--r--discord/mentions.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/discord/mentions.py b/discord/mentions.py
index 5b2a32e1..57b1e3fc 100644
--- a/discord/mentions.py
+++ b/discord/mentions.py
@@ -26,6 +26,7 @@ __all__ = (
'AllowedMentions',
)
+
class _FakeBool:
def __repr__(self):
return 'True'
@@ -36,8 +37,10 @@ class _FakeBool:
def __bool__(self):
return True
+
default = _FakeBool()
+
class AllowedMentions:
"""A class that represents what mentions are allowed in a message.
@@ -126,4 +129,7 @@ class AllowedMentions:
return AllowedMentions(everyone=everyone, roles=roles, users=users, replied_user=replied_user)
def __repr__(self):
- return '{0.__class__.__qualname__}(everyone={0.everyone}, users={0.users}, roles={0.roles}, replied_user={0.replied_user})'.format(self)
+ return (
+ f'{self.__class__.__name__}(everyone={self.everyone}, '
+ f'users={self.users}, roles={self.roles}, replied_user={self.replied_user})'
+ )