[discord.js] Translating from discord.js to Eris

Hi, I want to take some code from GitHub and edit it, however the code in GitHub is Eris and I only code in discord.js

Please can someone make this code into Eris for me:

message.channel.send("React with 
:white_check_mark: to win");
const collector = new 
collector.on('collect', (reaction) => {
  if (reaction == ":white_check_mark:") {
    message.channel.send("YOU WIN!!!");

Something like this will do:

message.channel.send(“React with:white_check_mark: to win”)

message.awaitReactions(filter, { max: 1, time: 60000, errors: [‘time’] })
.then(collected => {
const reaction = collected.first();

  if (reaction.emoji.name === ":white_check_mark:") {
  	message.reply("YOU WIN!!!"');


1 Like

Thanks! Does Eris use message.channel.send too?

Yes I’ve seen Eris code that use message.channel.send