Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@grammyjs/emoji

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grammyjs/emoji

Use emoji names instead of Unicode strings. Copy-pasting emoji sucks.

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
323
decreased by-24.18%
Maintainers
2
Weekly downloads
 
Created
Source

grammY Emoji

Adds emoji parsing for grammY. Check out the official documentation to learn more about this plugin.

Installation

Using NPM:

npm install @grammyjs/emoji

Using Yarn:

yarn add @grammyjs/emoji

Using Deno:

import {...} from "https://github.com/grammyjs/emoji/src/mod.ts";

Example Usage

import { Bot, Context } from "grammy";
import { EmojiFlavor, emojiParser } from "@grammyjs/emoji";

type MyContext = EmojiFlavor<Context>;
const bot = new Bot<MyContext>(""); // <-- put your bot token between the ""

bot.use(emojiParser());

bot.command("ping", async (ctx) => {
    // Don't know emoji names? No problem!
    // Press Ctrl + Space on supported editors to
    // see IntelliSense auto-completion magic.
    await ctx.reply(ctx.emoji`Pong! ${"ping_pong"}`);
    // > Pong! 🏓
});

bot.command("start", async (ctx) => {
    await ctx.replyWithEmoji`Welcome to my bot! ${"grinning_face_with_big_eyes"}`;
    // > Welcome to my bot! 😀
});

bot.start();

Pull Requests

Contributions are more than welcome! Just make sure if there is already a similar PR, so you can contribute from there.

Keywords

FAQs

Package last updated on 13 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc