Skip to main content
Module

x/grammy_emoji/mod.ts>EmojiFlavor

Helpers for sending emojis.
Latest
interface EmojiFlavor
import { type EmojiFlavor } from "https://deno.land/x/grammy_emoji@v0.8.13/mod.ts";

Properties

emoji: (name: TemplateStringsArray, ...emojis: EmojiName[]) => string

You can use this method to parse a string with emojis.

Keep in mind that you need to use this method with a template string.

Examples:

const text = ctx.emoji`LOL ${'joy'}!`; // => "LOL 😂!"
ctx.reply(ctx.emoji`This is an example! ${'innocent'}`); // => "This is an example! 😇"
replyWithEmoji: (string: TemplateStringsArray, ...emojis: EmojiName[]) => Promise<Message.TextMessage>

You can use this method to directly reply to a message with emojis parsing.

Keep in mind that you need to use this method with a template string.

Examples:

ctx.replyWithEmoji`This is an example! ${'innocent'}`; // => "This is an example! 😇"