diff options
| author | Rapptz <[email protected]> | 2015-10-23 21:04:52 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-10-23 21:04:52 -0400 |
| commit | 72674b4c2d66d61ad32e66b7fd0e66a443496d3f (patch) | |
| tree | 0838d6792ebba98a2de150f73cb95b1ee6d69b25 | |
| parent | Add Message.server attribute shortcut. (diff) | |
| download | discord.py-72674b4c2d66d61ad32e66b7fd0e66a443496d3f.tar.xz discord.py-72674b4c2d66d61ad32e66b7fd0e66a443496d3f.zip | |
Add Channel.mention to mention a channel.
| -rw-r--r-- | discord/channel.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/discord/channel.py b/discord/channel.py index 3d0c2481..42b3e6b8 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -101,6 +101,10 @@ class Channel(object): """Checks if this is the default channel for the :class:`Server` it belongs to.""" return self.server.id == self.id + def mention(self): + """Returns a string that allows you to mention the channel.""" + return '<#{0.id}>'.format(self) + def permissions_for(self, member): """Handles permission resolution for the current :class:`Member`. |