def mark(message: discord.Message, plugin: plugin_in_req, req_id: get_req_id):
""" Toggles marking a feature request as complete.
See `{pre}plugin` for a list of plugins. """
# Test and reply if feature by requested id doesn't exist
assert feature_exists(plugin, req_id), "There is no such feature."
req = feature_reqs.data[plugin][req_id]
# Mark or unmark the feature request by adding or removing +++ from the end (slightly hacked)
if not req.endswith("+++"):
feature_reqs.data[plugin][req_id] += "+++"
feature_reqs.save()
await client.say(message, "Marked feature with `{}` id **#{}**.".format(plugin, req_id + 1))
else:
feature_reqs.data[plugin][req_id] = req[:-3]
feature_reqs.save()
await client.say(message, "Unmarked feature with `{}` id **#{}**.".format(plugin, req_id + 1))
评论列表
文章目录