diff options
| author | Rapptz <[email protected]> | 2020-04-04 13:03:08 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-04-04 13:22:51 -0400 |
| commit | d853a57e8680529da0a4ebbdde703dd23f809065 (patch) | |
| tree | b4e1d37cd31b01f62ddc27593e35adbefdcc981c /discord/client.py | |
| parent | Allow introspection and setting of global allowed mention configuration (diff) | |
| download | discord.py-d853a57e8680529da0a4ebbdde703dd23f809065.tar.xz discord.py-d853a57e8680529da0a4ebbdde703dd23f809065.zip | |
Rename allowed mention parameters to allowed_mentions
Diffstat (limited to 'discord/client.py')
| -rw-r--r-- | discord/client.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/discord/client.py b/discord/client.py index 1b826b9b..f292c9d2 100644 --- a/discord/client.py +++ b/discord/client.py @@ -150,7 +150,7 @@ class Client: A status to start your presence with upon logging on to Discord. activity: Optional[:class:`.BaseActivity`] An activity to start your presence with upon logging on to Discord. - mentions: Optional[:class:`AllowedMentions`] + allowed_mentions: Optional[:class:`AllowedMentions`] Control how the client handles mentions by default on every message sent. .. versionadded:: 1.4 @@ -667,21 +667,21 @@ class Client: raise TypeError('activity must derive from BaseActivity.') @property - def mentions(self): + def allowed_mentions(self): """Optional[:class:`AllowedMentions`]: The allowed mention configuration. .. versionadded:: 1.4 """ - return self._connection.mentions + return self._connection.allowed_mentions - @mentions.setter - def mentions(self, value): + @allowed_mentions.setter + def allowed_mentions(self, value): if value is None: - self._connection.mentions = value + self._connection.allowed_mentions = value elif isinstance(value, AllowedMentions): - self._connection.mentions = value + self._connection.allowed_mentions = value else: - raise TypeError('mentions must be AllowedMentions not {0.__class__!r}'.format(value)) + raise TypeError('allowed_mentions must be AllowedMentions not {0.__class__!r}'.format(value)) # helpers/getters |