Skip to content

add-emoji-api #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 5 additions & 45 deletions src/honeybot/plugins/downloaded/emoji/main.py
Original file line number Diff line number Diff line change
@@ -1,56 +1,16 @@
import emoji


class Plugin:
def __init__(self):
pass

def __meaning(emoji):
d = {
"😀": "Grinning Face",
"😃": "Grinning Face with Big Eyes",
"😄": "Grinning Face with Smiling Eyes",
"😁": "Beaming Face with Smiling Eyes",
"😆": "Grinning Face with Sweat",
"🤣": "Rolling on the Floor Laughing",
"😂": "Face with Tears of Joy",
"🙂": "Slightly Smiling Face",
"🙃": "Upside-Down Face",
"😉": "Winking Face",
"😊": "Smiling Face with Smiling Eyes",
"😇": "Smiling Face with Halo",
"🥰": "Smiling Face with Hearts",
"😍": "Smiling Face with Heart-Eyes",
"🤩": "Star-Struck",
"😘": "Face Blowing a Kiss",
"😗": "Kissing Face",
"😉": "Winking Face",
"😊": "Smiling Face with Smiling Eyes",
"😇": "Smiling Face with Halo",
"🥰": "Smiling Face with Hearts",
"😍": "Smiling Face with Heart-Eyes",
"🤩": "Star-Struck",
"😘": "Face Blowing a Kiss",
"😗": "Kissing Face",
"😚": "Kissing Face with Closed Eyes",
"😙": "Kissing Face with Smiling Eyes",
"😋": "Face Savoring Food",
"😛": "Face with Tongue",
"😜": "Winking Face with Tongue",
"🤪": "Zany Face",
"😝": "Squinting Face with Tongue",
"🤑": "Money-Mouth Face",
"🤗": "Smiling Face with Open Hands",
"🤭": "Face with Hand Over Mouth",
}
if emoji in d.keys():
return d[emoji]
else:
return "not supported"

def run(self, incoming, methods, info, bot_info):
try:
msgs = info["args"][1:][0].split()
print(len(msgs))
if info["command"] == "PRIVMSG" and msgs[0] == ".emoji":
emoji = str(msgs[1])
methods["send"](info["address"], Plugin.__meaning(emoji))
meaning = emoji.demojize(str(msgs[1]))
methods["send"](info["address"], meaning)
except Exception as e:
print("woops plugin error ", e)
1 change: 1 addition & 0 deletions src/honeybot/plugins/downloaded/emoji/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
emoji