mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 18:02:31 -05:00
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:
@@ -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,
|
||||
|
||||
@@ -193,7 +193,6 @@ class Reports(commands.Cog):
|
||||
return guild
|
||||
|
||||
async def send_report(self, ctx: commands.Context, msg: discord.Message, guild: discord.Guild):
|
||||
|
||||
author = guild.get_member(msg.author.id)
|
||||
report = msg.clean_content
|
||||
|
||||
@@ -207,7 +206,7 @@ class Reports(commands.Cog):
|
||||
ticket_number = await self.config.guild(guild).next_ticket()
|
||||
await self.config.guild(guild).next_ticket.set(ticket_number + 1)
|
||||
|
||||
if await self.bot.embed_requested(channel, author):
|
||||
if await self.bot.embed_requested(channel):
|
||||
em = discord.Embed(description=report, colour=await ctx.embed_colour())
|
||||
em.set_author(
|
||||
name=_("Report from {author}{maybe_nick}").format(
|
||||
|
||||
Reference in New Issue
Block a user