Skip to content

Commit 35c7dc1

Browse files
authored
docs: 📝 update docstrings for Asset and Attachment classes to clarify hash return values (#2832)
📝 update docstrings for Asset and Attachment classes to clarify hash return values
1 parent 9a0e5c0 commit 35c7dc1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

discord/asset.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ class Asset(AssetMixin):
144144
145145
.. describe:: hash(x)
146146
147-
Returns the hash of the asset.
147+
Returns the asset's url's hash.
148+
149+
This is equivalent to hash(:attr:`url`).
148150
"""
149151

150152
__slots__: tuple[str, ...] = (

discord/message.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ class Attachment(Hashable):
146146
147147
.. describe:: hash(x)
148148
149-
Returns the hash of the attachment.
149+
Returns the attachment's unique identifier.
150+
151+
This is equivalent to :attr:`id`.
150152
151153
.. versionchanged:: 1.7
152154
Attachment can now be cast to :class:`str` and is hashable.

0 commit comments

Comments
 (0)