fix (setprofile): Guard against empty input.

This commit is contained in:
2021-12-29 21:57:32 +02:00
parent 113ff0379a
commit b1bcee8cc6

View File

@@ -144,6 +144,9 @@ async def cmd_setprofile(ctx, flags):
# Parse and validate
to_add = [split.strip().upper() for line in ctx.args.splitlines() for split in line.split(',')]
to_add = [split.replace('<3', '❤️') for split in to_add if split]
if not to_add:
return await ctx.error_reply("No valid tags given, nothing to do!")
validate_tag(*to_add)
if len(to_add) > MAX_TAGS: