Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

discord-memoji

Plattyz10ISC1.1.0

Memoji is a discord npm package that allows you to manage every emotes/emojis on your server in an easy and efficient way.

emoji, discord, discord.js, easy, src, nyrok, mokmi, funny, open-source, help, unicode

readme

discord-memoji

A npm package to manage easily server's emojis.

Usage

Initialization

You have to install discord.js version including v12. This structure is necessary in order for the package to work.

const { 
    Client,
    Structures
} = require('discord.js')
require('discord-memoji')(Structures);
const client = new Client();

Show Emoji's URL with Message Listener

The structure of our functions is made with "Guild" class so be sure to use it. Then, our functions will just do the job for you !

client.on('message', message => {
    if (message.content.startsWith("!emojishow")) {
        let emoji = message.content.split(" ").slice(1)
        message.reply(message.guild.emojiShow(emoji))
    }
})

Add Emoji with Message Listener

Parameter image only works with image links and not files at the moment.

client.on('message', message => {
if (message.content.startsWith("!emojiadd")) { 
        let args = message.content.split(" ")
        let name = args[1]
        let image = args[2]
        console.log(image)
        message.guild.emojiAdd(name, image);
    }
})

All of This (Full Example)

const {
    Client,
    Structures
} = require('discord.js')
require('discord-memoji')(Structures);
const client = new Client();

client.on('message', message => {
    if (message.content.startsWith("!emojishow")) {
        let emoji = message.content.split(" ").slice(1)
        message.reply(message.guild.emojiShow(emoji))
    }
    if (message.content.startsWith("!emojiadd")) {
        let args = message.content.split(" ")
        let name = args[1]
        let image = args[2]
        console.log(image)
        message.guild.emojiAdd(name, image);
    }
})
client.login('YOUR_CLIENT_TOKEN');

Install

npm install discord-memoji

Changelog

1.0.1

  • Adding guild.<functions> extension according with Discord.js.
  • Adding colors package.
  • Adding emojiShow function.
  • Adding emojiAdd function.

Credits