modules/CommandJoinAll.py
authorSomeone <someone@somenet.org>
Mon, 10 Jan 2022 17:13:06 +0000 (18:13 +0100)
committerSomeone <someone@somenet.org>
Mon, 10 Jan 2022 17:13:06 +0000 (18:13 +0100)
modules/CommandJoinAll.py

index 5b73807dbb3394c0d33584deeb9d21e6a6cac1cb..324eeb2938bdf5e22c257d889038927a2cab1693 100644 (file)
@@ -21,9 +21,9 @@ class CommandJoinAll(AbstractCommand):
 
     def on_POST(self, request, data):
         msg = ""
-        for c in self.bot.api.get_team_channels(self.TEAM_ID):
-            if not c["id"] in self.skip_chann_ids:
-                self.bot.api.add_user_to_channel(c["id"], data["user_id"])
-                msg += "\n + ~"+c["name"]
+        for chan in self.bot.api.get_team_channels(self.TEAM_ID):
+            if not chan["id"] in self.skip_chann_ids:
+                self.bot.api.add_user_to_channel(chan["id"], data["user_id"])
+                msg += "\n + ~"+chan["name"]
 
         request.respond_cmd_temp("## :white_check_mark: Success! :)\nYou joined all the public channels in the team:\n{}\nA reload might be needed to display the updated list of channels".format(msg))