i write simple cod:
@commands.Cog.listener()
async def on_raw_message_delete(self, ctx):
if ctx.cached_message.author.bot is False:
embed=discord.Embed(title='Deleted message:', description=ctx.cached_message.content, color=0xff00f6)
embed.set_author(name = ctx.cached_message.author, icon_url=ctx.cached_message.author.avatar_url)
embed.set_image(url = ctx.cached_message.attachments[0].url)
await ctx.cached_message.channel.send(embed = embed)
and this code didn't set image because it was access denied response. Image url response(if I go to url):
<Error>
<Code>AccessDenied</Code>
<Message>Access denied.</Message>
<Details>Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object.</Details>
</Error>
how can I send cached image?
p.s. I know there is a error in this code if attachments is None.
question from:
https://stackoverflow.com/questions/65918628/discord-py-rewrite-not-return-cached-image 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…