Skip to content
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

Create `!emojify` #444

Merged
merged 3 commits into from Jun 8, 2019

Conversation

Projects
None yet
2 participants
@bradleysigma
Copy link
Contributor

commented Jun 7, 2019

Creates the !emojify command, that will convert argument text to emoji
image
For each character, will use each emoji an equal (±1) number of times.
Largely reimplments reacitfy.js from unimplmeneted_commands.

@nicklambourne
Copy link
Member

left a comment

Some requests and questions to address. Glad you've brought this one back!

Show resolved Hide resolved uqcsbot/scripts/emojify.py Outdated
'''
`!emojify text` - converts text to emoji.
'''
master: Dict[str, List[str]] = defaultdict(lambda: ["grey_question"])

This comment has been minimized.

Copy link
@nicklambourne

nicklambourne Jun 7, 2019

Member

I feel like this should all be declared in a util file and imported for use here. Will make the command much nicer to read.

This comment has been minimized.

Copy link
@bradleysigma

bradleysigma Jun 7, 2019

Author Contributor

Making it a util file only seems worth it if it were to be used by multiple commands, which seems unlikely to me.

Show resolved Hide resolved uqcsbot/scripts/emojify.py Outdated

master[' '] = ["whitespace"]

master['@'] = ["whip"]

This comment has been minimized.

Copy link
@nicklambourne

nicklambourne Jun 7, 2019

Member

Something for period and comma probably wouldn't go astray.

This comment has been minimized.

Copy link
@bradleysigma

bradleysigma Jun 7, 2019

Author Contributor

. added. Can't find a good ,.

Show resolved Hide resolved uqcsbot/scripts/emojify.py
Update emojify.py
Added comments, fstring, reordered symbols.

@bradleysigma bradleysigma requested a review from nicklambourne Jun 7, 2019

@nicklambourne nicklambourne merged commit f62c52c into master Jun 8, 2019

1 check passed

Jenkins 57 tests run, 0 skipped, 0 failed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.