Skip to content

Commit

Permalink
Add 'mention' property for PartialWebhookChannel
Browse files Browse the repository at this point in the history
  • Loading branch information
Gooraeng committed Feb 8, 2025
1 parent db7b2d9 commit 61a579b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions discord/webhook/async_.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,11 @@ def __init__(self, *, data: PartialChannelPayload) -> None:

def __repr__(self) -> str:
return f'<PartialWebhookChannel name={self.name!r} id={self.id}>'

@property
def mention(self) -> str:
""":class:`str`: The string that allows you to mention the channel that the webhook is following."""
return f'<#{self.id}>'


class PartialWebhookGuild(Hashable):
Expand Down

0 comments on commit 61a579b

Please sign in to comment.