'Trying to spoiler an image send via link acquired by praw module (discord.py)
@commands.command()
async def fifty(self, ctx):
_5050 = reddit.subreddit('FiftyFifty').hot()
post_to_pick = random.randint(1, 10)
for i in range(0, post_to_pick):
submission = next(x for x in _5050 if not x.stickied)
await ctx.send(submission.url)
The submission.url sends an image using a link, How do I spoiler the particular image?
Solution 1:[1]
Since you’re sending an URL, you can simply put it in between double pipes - ||
await ctx.send(f"||{submission.url}||")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Åukasz KwieciÅ„ski |
