From be46fba566886ae410eed51b2dfe9690e30dda3f Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Mon, 26 Apr 2021 15:42:56 +0300 Subject: [PATCH] [scripts/copy-crosscode-emoji-url] add an option for allowing nsfw emotes --- scripts/copy-crosscode-emoji-url | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/copy-crosscode-emoji-url b/scripts/copy-crosscode-emoji-url index e5ad71b..45c6935 100755 --- a/scripts/copy-crosscode-emoji-url +++ b/scripts/copy-crosscode-emoji-url @@ -51,7 +51,8 @@ def emote_downloader_and_iterator() -> Generator[str, None, None]: assert emote_registry_data["version"] == 1 - emotes = [emote for emote in emote_registry_data["list"] if emote["safe"]] + allow_nsfw = config.getboolean("default", "allow_nsfw", fallback=False) + emotes = [emote for emote in emote_registry_data["list"] if emote["safe"] or allow_nsfw] for emote in emotes: yield "{emote[ref]} [{emote[guild_name]}]".format(emote=emote)