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/webhook.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/webhook.py')
| -rw-r--r-- | discord/webhook.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/discord/webhook.py b/discord/webhook.py index 3218f2ab..803cf732 100644 --- a/discord/webhook.py +++ b/discord/webhook.py @@ -688,7 +688,7 @@ class Webhook: return self._adapter.edit_webhook(**payload) def send(self, content=None, *, wait=False, username=None, avatar_url=None, tts=False, - file=None, files=None, embed=None, embeds=None, mentions=None): + file=None, files=None, embed=None, embeds=None, allowed_mentions=None): """|maybecoro| Sends a message using the webhook. @@ -732,8 +732,8 @@ class Webhook: embeds: List[:class:`Embed`] A list of embeds to send with the content. Maximum of 10. This cannot be mixed with the ``embed`` parameter. - mentions: :class:`AllowedMentions` - Controls the mentions being processed in this message. + allowed_mentions: :class:`AllowedMentions` + Controls the allowed_mentions being processed in this message. .. versionadded:: 1.4 @@ -781,13 +781,13 @@ class Webhook: if username: payload['username'] = username - previous_mentions = getattr(self._state, 'mentions', None) + previous_mentions = getattr(self._state, 'allowed_mentions', None) - if mentions: + if allowed_mentions: if previous_mentions is not None: - payload['allowed_mentions'] = previous_mentions.merge(mentions).to_dict() + payload['allowed_mentions'] = previous_mentions.merge(allowed_mentions).to_dict() else: - payload['allowed_mentions'] = mentions.to_dict() + payload['allowed_mentions'] = allowed_mentions.to_dict() elif previous_mentions is not None: payload['allowed_mentions'] = previous_mentions.to_dict() |