discord-emojify
v1.0.9
Published
An NPM package that converts words to text. In short, an emojifier.
Downloads
14
Maintainers
Readme
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?
- Node.js v12+
- discord.js v12
- An average-sized brain
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