我正在尝试使用 PRAW 作为discord.py 命令。但是,我不希望在执行命令时播放视频,那么有没有办法只能在收到帖子时才能获取图片?
这是我所拥有的:
@commands.command()
async def aww(self, ctx):
subreddit = reddit.subreddit("aww")
allsubs = []
top = subreddit.top(limit = 50)
for submission in top:
allsubs.append(submission)
randomsub = random.choice(allsubs)
name = randomsub.title
url = randomsub.url
em = discord.Embed(
title = name,
color = discord.Color.blurple()
)
em.set_image(url = url)
await ctx.send(embed = em)
任何帮助将不胜感激,谢谢!
慕工程0101907
相关分类