discord-emojify

1.0.9 • Public • Published

discord-emojify

What is discord-emojify?

It is an NPM package that converts most text into emoji letters/numbers/symbols. In short, emojifying.

What do you need?

Get Started

To get started, do this:

npm install discord-emojify

Here is a code example of using discord-emojify.

const Discord = require("discord.js");
const client = new Discord.Client();

const settings = {
  token: "TOKEN_HERE",
  prefix: "!"
}

const emojify = require("discord-emojify"); // Require the package.

// You can use any prefix, this is only an example!
client.on("ready", () => {
  console.log(`Logged in and ready! Bot: ${client.user.tag}`);
});

client.on("message", async message => {
  if (message.author.bot || message.content.toLowerCase().startsWith(settings.prefix)) return;
  
  const args = message.content.slice(prefix1.length).trim().split(/ +/);
  const command = args.shift().toLowerCase();

  if (command === "emojify") {
    if (!args.length) return message.channel.send("Provide arguments to emojify!");
    const emojified = await emojify(args.join(" ")) // Emojify all arguments!
    message.channel.send(emojified);
  }
});

client.login(settings.token);

Note: You have to either use async/await or promises, or else the package won't function.

If you need more support, join the Discord server.

Changelog for v1.0.7

  • Fixed server emoji bug

Package Sidebar

Install

npm i discord-emojify

Weekly Downloads

8

Version

1.0.9

License

ISC

Unpacked Size

3.27 kB

Total Files

4

Last publish

Collaborators

  • aizakkudev