aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml2
-rw-r--r--bot/bot.py2
-rw-r--r--bot/constants.py4
-rw-r--r--bot/exts/recruitment/talentpool/_cog.py28
-rw-r--r--config-default.yml13
5 files changed, 33 insertions, 16 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e6826e09b..84a671917 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -39,7 +39,7 @@ jobs:
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
- password: ${{ secrets.GHCR_TOKEN }}
+ password: ${{ secrets.GITHUB_TOKEN }}
# Build and push the container to the GitHub Container
# Repository. The container will be tagged as "latest"
diff --git a/bot/bot.py b/bot/bot.py
index 3a2af472d..914da9c98 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -111,7 +111,7 @@ class Bot(commands.Bot):
loop = asyncio.get_event_loop()
allowed_roles = [discord.Object(id_) for id_ in constants.MODERATION_ROLES]
- intents = discord.Intents().all()
+ intents = discord.Intents.all()
intents.presences = False
intents.dm_typing = False
intents.dm_reactions = False
diff --git a/bot/constants.py b/bot/constants.py
index 8c42daca6..4884a1278 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -388,6 +388,7 @@ class Categories(metaclass=YAMLGetter):
help_available: int
help_dormant: int
help_in_use: int
+ moderators: int
modmail: int
voice: int
@@ -433,9 +434,8 @@ class Channels(metaclass=YAMLGetter):
helpers: int
incidents: int
incidents_archive: int
- mods: int
mod_alerts: int
- mod_spam: int
+ nominations: int
nomination_voting: int
organisation: int
diff --git a/bot/exts/recruitment/talentpool/_cog.py b/bot/exts/recruitment/talentpool/_cog.py
index b809cea17..fbe79382d 100644
--- a/bot/exts/recruitment/talentpool/_cog.py
+++ b/bot/exts/recruitment/talentpool/_cog.py
@@ -113,15 +113,39 @@ class TalentPool(WatchChannel, Cog, name="Talentpool"):
"""
await ctx.invoke(self.watched_command, oldest_first=True, update_cache=update_cache)
+ @nomination_group.command(name='forcewatch', aliases=('fw', 'forceadd', 'fa'), root_aliases=("forcenominate",))
+ @has_any_role(*MODERATION_ROLES)
+ async def force_watch_command(self, ctx: Context, user: FetchedMember, *, reason: str = '') -> None:
+ """
+ Adds the given `user` to the talent pool, from any channel.
+
+ A `reason` for adding the user to the talent pool is optional.
+ """
+ await self._watch_user(ctx, user, reason)
+
@nomination_group.command(name='watch', aliases=('w', 'add', 'a'), root_aliases=("nominate",))
@has_any_role(*STAFF_ROLES)
async def watch_command(self, ctx: Context, user: FetchedMember, *, reason: str = '') -> None:
"""
- Relay messages sent by the given `user` to the `#talent-pool` channel.
+ Adds the given `user` to the talent pool.
A `reason` for adding the user to the talent pool is optional.
- If given, it will be displayed in the header when relaying messages of this user to the channel.
+ This command can only be used in the `#nominations` channel.
"""
+ if ctx.channel.id != Channels.nominations:
+ if any(role.id in MODERATION_ROLES for role in ctx.author.roles):
+ await ctx.send(
+ f":x: Nominations should be run in the <#{Channels.nominations}> channel. "
+ "Use `!tp forcewatch` to override this check."
+ )
+ else:
+ await ctx.send(f":x: Nominations must be run in the <#{Channels.nominations}> channel")
+ return
+
+ await self._watch_user(ctx, user, reason)
+
+ async def _watch_user(self, ctx: Context, user: FetchedMember, reason: str) -> None:
+ """Adds the given user to the talent pool."""
if user.bot:
await ctx.send(f":x: I'm sorry {ctx.author}, I'm afraid I can't do that. I only watch humans.")
return
diff --git a/config-default.yml b/config-default.yml
index c5e830ec4..b89f1505e 100644
--- a/config-default.yml
+++ b/config-default.yml
@@ -139,6 +139,7 @@ guild:
help_dormant: 691405908919451718
help_in_use: 696958401460043776
logs: &LOGS 468520609152892958
+ moderators: &MODS_CATEGORY 749736277464842262
modmail: &MODMAIL 714494672835444826
voice: 356013253765234688
@@ -191,12 +192,8 @@ guild:
helpers: &HELPERS 385474242440986624
incidents: 714214212200562749
incidents_archive: 720668923636351037
- mods: &MODS 305126844661760000
mod_alerts: 473092532147060736
- mod_appeals: &MOD_APPEALS 808790025688711198
- mod_meta: &MOD_META 775412552795947058
- mod_spam: &MOD_SPAM 620607373828030464
- mod_tools: &MOD_TOOLS 775413915391098921
+ nominations: 822920136150745168
nomination_voting: 822853512709931008
organisation: &ORGANISATION 551789653284356126
staff_lounge: &STAFF_LOUNGE 464905259261755392
@@ -225,17 +222,13 @@ guild:
talent_pool: &TALENT_POOL 534321732593647616
moderation_categories:
+ - *MODS_CATEGORY
- *MODMAIL
- *LOGS
moderation_channels:
- *ADMINS
- *ADMIN_SPAM
- - *MOD_APPEALS
- - *MOD_META
- - *MOD_TOOLS
- - *MODS
- - *MOD_SPAM
# Modlog cog ignores events which occur in these channels
modlog_blacklist: