Implement __len__
on src/IRCChannel.py.Channels
This commit is contained in:
parent
c50622c1a4
commit
e29cc1c52c
1 changed files with 2 additions and 0 deletions
|
@ -168,6 +168,8 @@ class Channels(object):
|
|||
return (channel for channel in self._channels.values())
|
||||
def __contains__(self, name: str) -> bool:
|
||||
return self.contains(name)
|
||||
def __len__(self) -> int:
|
||||
return len(self._channels)
|
||||
|
||||
def _get_id(self, channel_name: str) -> int:
|
||||
self._bot.database.channels.add(self._server.id, channel_name)
|
||||
|
|
Loading…
Reference in a new issue