diff --git a/discord/abc.py b/discord/abc.py index a4cdae5a6..c54404799 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -194,7 +194,7 @@ class GuildChannel: @property def mention(self): """str : The string that allows you to mention the channel.""" - return '<#{0.id}>'.format(self) + return '<#%s>' % self.id @property def created_at(self): diff --git a/discord/client.py b/discord/client.py index 6979df06d..85bbca151 100644 --- a/discord/client.py +++ b/discord/client.py @@ -210,7 +210,7 @@ class Client: pass def dispatch(self, event, *args, **kwargs): - log.debug('Dispatching event {}'.format(event)) + log.debug('Dispatching event %s', event) method = 'on_' + event handler = 'handle_' + event diff --git a/discord/member.py b/discord/member.py index 35ae584a1..5cc722e7b 100644 --- a/discord/member.py +++ b/discord/member.py @@ -249,8 +249,8 @@ class Member(discord.abc.Messageable): def mention(self): """Returns a string that mentions the member.""" if self.nick: - return '<@!{}>'.format(self.id) - return '<@{}>'.format(self.id) + return '<@!%s>' % self.id + return '<@%s>' % self.id @property def display_name(self): diff --git a/discord/message.py b/discord/message.py index 79aa29c2a..08122fefb 100644 --- a/discord/message.py +++ b/discord/message.py @@ -285,18 +285,18 @@ class Message: """ transformations = { - re.escape('<#{0.id}>'.format(channel)): '#' + channel.name + re.escape('<#%s>' % channel.id): '#' + channel.name for channel in self.channel_mentions } mention_transforms = { - re.escape('<@{0.id}>'.format(member)): '@' + member.display_name + re.escape('<@%s>' % member.id): '@' + member.display_name for member in self.mentions } # add the <@!user_id> cases as well.. second_mention_transforms = { - re.escape('<@!{0.id}>'.format(member)): '@' + member.display_name + re.escape('<@!%s>' % member.id): '@' + member.display_name for member in self.mentions } @@ -305,7 +305,7 @@ class Message: if self.guild is not None: role_transforms = { - re.escape('<@&{0.id}>'.format(role)): '@' + role.name + re.escape('<@&%s>' % role.id): '@' + role.name for role in self.role_mentions } transformations.update(role_transforms) diff --git a/discord/role.py b/discord/role.py index a0d4050c1..3a1d6c8ad 100644 --- a/discord/role.py +++ b/discord/role.py @@ -148,7 +148,7 @@ class Role(Hashable): @property def mention(self): """Returns a string that allows you to mention a role.""" - return '<@&{}>'.format(self.id) + return '<@&%s>' % self.id @property def members(self):