From e5e704161c8adbcad90c0c8273ea1aa84375b815 Mon Sep 17 00:00:00 2001 From: Someone Date: Mon, 10 Jan 2022 19:27:34 +0100 Subject: [PATCH] modules/TACommandAnnounceAll.py --- modules/TACommandAnnounceAll.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/TACommandAnnounceAll.py b/modules/TACommandAnnounceAll.py index e894fe1..125c2e4 100644 --- a/modules/TACommandAnnounceAll.py +++ b/modules/TACommandAnnounceAll.py @@ -17,13 +17,11 @@ class TACommandAnnounceAll(AbstractCommand): def on_POST(self, request, data): posted_to = "" - for t in self.bot.api.get_teams(): - user = self.bot.api.get_team_member(t["id"], data["user_id"], exc=False) + for team in self.bot.api.get_teams(): + user = self.bot.api.get_team_member(team["id"], data["user_id"], exc=False) if ("roles" in user and "team_admin" in user["roles"]) or self._require_team_admin(data, exc=False): - channel = self.bot.api.get_channel_by_name(t["id"], "town-square") - #self.bot.api.create_post(channel["id"], data["text"]) - posted_to += "\n+ "+t["name"] + posted_to += "\n+ "+team["name"] if posted_to != "": request.respond_cmd_temp("## :white_check_mark: Success! :)\n#### Posted to:"+posted_to) -- 2.43.0