grammyjs / emoji Goto Github PK
View Code? Open in Web Editor NEWHelpers for sending emojis.
Home Page: https://grammy.dev/plugins/emoji
License: MIT License
Helpers for sending emojis.
Home Page: https://grammy.dev/plugins/emoji
License: MIT License
If I adjust the return type of ctx.reply
using a different plugin, such as the hydrate plugin, I would like the type of ctx.replyWithEmoji
to adjust accordingly. This makes it necessary to use a transformative context flavour, rather than an additive one.
Hello. While using this plugin I found an awkward situation that ctx.emoji
cannot be used to concatenate anything other than just emojis or plain text. you have to create constructions that are difficult to read and use, like this:
// since i need to localize the text (i18n)
// i have to get the localized text by id first
`${ctx.t('books')} ${ctx.emoji`${'books'}`}`
Although it would be more convenient to do this:
ctx.emoji`${ctx.t('books')} ${'books'}`
And all because ctx.emoji
returns an exception if no emoji is found. I consider this unnecessary, because if the emoji is not displayed, then the developer will simply go and find the triple emoji in the plugin resources.
Maybe I'm wrong in my thinking, and it goes against the philosophy of the plugin, so I'd be happy to hear back.
This plugin MUST support skin-toned emojis (πππ»ππΌππ½ππΎππΏ) since they're a fundamental part of Unicode emojis.
Quick thoughts:
ctx.emoji`${"like:medium-dark"}` // ππΎ
ctx.emoji`${"punch:light"}` // ππ»
ctx.emoji`${"raised_hands"}` // π
This plugin MUST have new emojis coming from Unicode 14, even if they haven't been added to Telegram yet β soon they will come.
This is related to PR #2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.