Fix lokale testbug als kanaal niet bestaat

This commit is contained in:
2022-10-25 22:40:26 +02:00
parent e7284d2c28
commit 9512b9dc86
+2 -1
View File
@@ -264,7 +264,8 @@ class Points(commands.Cog):
np.save("pointscount.npy", pointsCount)
# Add new/unknown members:
memberList = self.bot.get_channel(self.bot.hdChannels["shitpost"]).members
list_channel = self.bot.get_channel(self.bot.hdChannels["shitpost"])
memberList = list_channel.members if list_channel else []
for member in memberList:
# Give new members 100 points
if member.id not in pointsCount.keys() and not member.bot: