Implement list

Allow users to query all the available emotes using the new special
emote reference "list". Replace the legacy GitHub link with a reference
to this command.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2024-09-20 16:31:32 +02:00
parent 4c72735bfe
commit f462bb1798
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57

View File

@ -157,9 +157,13 @@ class UnicodeEmoji(callbacks.Plugin):
def e(self, irc, msg, args, emote): def e(self, irc, msg, args, emote):
"""<emote> """<emote>
Prints the Unicode emoji as listed here https://gist.github.com/mogad0n/476c3880dc0e0a059ed03efa265e50f7 Prints the Unicode emoji as listed with `!e list`
""" """
if emote == 'list':
irc.reply(', '.join(emoji.keys()), msg=msg, prefixNick=False)
return
re = emoji.get(emote.lower()) re = emoji.get(emote.lower())
if re is None: if re is None:
re = emoji['fuck-off'] re = emoji['fuck-off']