From 6623492cebd18a26f0b1c752069c42bc201eed60 Mon Sep 17 00:00:00 2001 From: Someone Date: Sat, 22 Jan 2022 00:40:44 +0100 Subject: [PATCH] modules/TACommandAnnounceAll.py --- modules/TACommandAnnounceAll.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/TACommandAnnounceAll.py b/modules/TACommandAnnounceAll.py index 125c2e4..85085ea 100644 --- a/modules/TACommandAnnounceAll.py +++ b/modules/TACommandAnnounceAll.py @@ -20,7 +20,9 @@ class TACommandAnnounceAll(AbstractCommand): 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): + if ("roles" in user and "team_admin" in user["roles"]) or self._require_system_admin(data, exc=False): + channel = self.bot.api.get_channel_by_name(team["id"], "town-square") + self.bot.api.create_post(channel["id"], data["text"]) posted_to += "\n+ "+team["name"] if posted_to != "": -- 2.43.0