From e9c9ec778cb0df1b1093a851cc7ad9cad9bbdff7 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 13 Nov 2018 11:36:44 +0000 Subject: [PATCH] Add .keys()/.values()/.items to src/IRCChannels.py --- src/IRCChannels.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/IRCChannels.py b/src/IRCChannels.py index 721afebb..fc96a2e1 100644 --- a/src/IRCChannels.py +++ b/src/IRCChannels.py @@ -18,6 +18,13 @@ class Channels(object): def __getitem__(self, name: str): return self.get(name) + def keys(self): + return self._channels.keys() + def values(self): + return self._channels.values() + def items(self): + return self._channels.items() + def _get_id(self, channel_name: str) -> int: self._bot.database.channels.add(self._server.id, channel_name) return self._bot.database.channels.get_id(self._server.id, channel_name)