Skip to content

Commit 7a46bd1

Browse files
committed
If the cache hasn't populated, assume we are not a moderator yet.
Unfortunately there is no way around this given current design.
1 parent 49fa07e commit 7a46bd1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

twitchio/channel.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ def _fetch_message(self):
6666
return self._message # Abstract method
6767

6868
def _bot_is_mod(self):
69-
cache = self._ws._cache[self.name] # noqa
69+
try:
70+
cache = self._ws._cache[self.name] # noqa
71+
except KeyError:
72+
return False
73+
7074
for user in cache:
7175
if user.name == self._ws.nick:
7276
try:

0 commit comments

Comments
 (0)