[Warnings] (#5120)

This commit is contained in:
Just-Jojo 2021-06-13 20:21:19 -04:00 committed by GitHub
parent 5ead38c284
commit b2db0674d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -395,6 +395,8 @@ class Warnings(commands.Cog):
if (reason_type := registered_reasons.get(reason.lower())) is None:
msg = _("That is not a registered reason!")
if custom_allowed:
if points <= 0:
return await ctx.send(_("You cannot apply 0 or less points."))
reason_type = {"description": reason, "points": points}
else:
# logic taken from `[p]permissions canrun`