Skip to content

Commit 3c6c949

Browse files
committed
Fix response failing to send
1 parent 6918f92 commit 3c6c949

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
### Fixed
1717
- Editing notes now works, minor bug with edit command is fixed.
18+
- Bug in the `oauth` command where the response message fails to send when an ID is provided.
1819

1920
# v2.24.1
2021

cogs/utility.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,10 @@ def get_level(perm_level):
13281328
)
13291329
@checks.has_permissions(PermissionLevel.OWNER)
13301330
async def oauth(self, ctx):
1331-
"""Commands relating to Logviewer oauth2 login authentication."""
1331+
"""Commands relating to Logviewer oauth2 login authentication.
1332+
1333+
This functionality on your logviewer site is a [**Patron**](https://patreon.com/kyber) only feature.
1334+
"""
13321335
await ctx.send_help(ctx.command)
13331336

13341337
@oauth.command(name="whitelist")
@@ -1352,6 +1355,10 @@ async def oauth_whitelist(self, ctx, target: Union[User, Role]):
13521355

13531356
embed = Embed(color=self.bot.main_color)
13541357
embed.title = "Success"
1358+
1359+
if not hasattr(target, 'mention'):
1360+
target = self.bot.get_user(target.id) or self.bot.modmail_guild.get_role(target.id)
1361+
13551362
embed.description = (
13561363
f"{'Un-w' if removed else 'W'}hitelisted " f"{target.mention} to view logs."
13571364
)

0 commit comments

Comments
 (0)