Support all Messageables in bot.embed_requested() (#5576)

* Support all Messageables in bot.embed_requested

* Update usage in core

* Simplify [p]contact

This couldn't be done before this change.

I have also simplified getting embed color.

* Make `True` the new default for `check_permissions` kwarg
This commit is contained in:
jack1142
2022-03-21 17:22:55 +01:00
committed by GitHub
parent f763d29fd4
commit 0f299ae195
7 changed files with 38 additions and 51 deletions

View File

@@ -543,8 +543,7 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass):
if not reason:
reason = _("No reason provided.")
# okay, this is some poor API to require PrivateChannel here...
if await self.bot.embed_requested(await user.create_dm(), user):
if await self.bot.embed_requested(user):
em = discord.Embed(
title=title,
description=reason,