class imgbypass(commands.Cog):
def __init__(self, bot):
self.bot = bot
@slash_command(guild_ids=[purgMain],description="Used to bypass improper filtering of images.") # Create a slash command for the supplied guilds.
@commands.cooldown(1, 120, commands.BucketType.default)
@commands.max_concurrency(2, per=commands.BucketType.default, wait=False)
async def imgbypass(self,
ctx,
image: discord.Option(discord.Attachment, required=True),
):
if image.content_type not in allowed_content_types:
return await ctx.respond("Invalid attachment, try a .png file or a .jpeg file!", ephemeral=True)
else:
'''EMBED IMAGE HERE SOMEHOW'''
embed = discord.Embed(color=0x00B1FF)
embed.set_author(name="test")
await ctx.channel.edit(nsfw=True)
await ctx.respond(embed=embed)
await ctx.channel.edit(nsfw=False)
Trying to figure out how to turn that discord.attachment object to something I can put in the url field