From 7e6d25a7f2a465c4a08d55f94ab760de27c30fb0 Mon Sep 17 00:00:00 2001 From: SebastiaanZ <33516116+SebastiaanZ@users.noreply.github.com> Date: Wed, 3 Jul 2019 20:04:31 +0200 Subject: Change end nomination API endpoint to PATCH endpoint --- bot/cogs/watchchannels/bigbrother.py | 1 - bot/cogs/watchchannels/talentpool.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bot/cogs/watchchannels/bigbrother.py b/bot/cogs/watchchannels/bigbrother.py index ff26794f7..5bf644f38 100644 --- a/bot/cogs/watchchannels/bigbrother.py +++ b/bot/cogs/watchchannels/bigbrother.py @@ -57,7 +57,6 @@ class BigBrother(WatchChannel): return if not await self.fetch_user_cache(): - await ctx.send(f":x: Updating the user cache failed, can't watch user {user}") return diff --git a/bot/cogs/watchchannels/talentpool.py b/bot/cogs/watchchannels/talentpool.py index 45b695e55..b1be6b9d9 100644 --- a/bot/cogs/watchchannels/talentpool.py +++ b/bot/cogs/watchchannels/talentpool.py @@ -145,13 +145,13 @@ class TalentPool(WatchChannel): ) if not active_nomination: - await ctx.send(":x: The specified user does not have an active Nomination") + await ctx.send(":x: The specified user does not have an active nomination") return [nomination] = active_nomination - await self.bot.api_client.put( + await self.bot.api_client.patch( f"{self.api_endpoint}/{nomination['id']}", - json={'end_reason': reason} + json={'end_reason': reason, 'active': False} ) await ctx.send(f":white_check_mark: Messages sent by {user} will no longer be relayed") self._remove_user(user.id) -- cgit v1.2.3