def review(ctx, amount=1, member: discord.Member = None):
if member is None:
member = ctx.message.author
if ctx.message.channel.id == review_channel_id:
if amount < 1 or amount > 5:
return await yeebot.say("Please use the format `!review <1-5>`.")
elif amount > 1 and amount < 6:
cur.execute("SELECT link, submitter_name FROM links WHERE status = 'review' LIMIT ?", (amount, ))
links = cur.fetchall()
if links:
for row in links:
await yeebot.say("Submitted by: {}, `{}`".format(row[1], row[0]))
else:
return await yeebot.say("No links to review.")
else:
cur.execute("SELECT link, submitter_name FROM links WHERE status = 'review' LIMIT ?", (amount, ))
links = cur.fetchall()
if links:
for row in links:
await yeebot.say("Submitted by: {}, {}".format(row[1], row[0]))
else:
return await yeebot.say("No links to review.")
else:
return await yeebot.say("You do not have permission to execute this command.")
评论列表
文章目录