abalabahaha / eris

A NodeJS Discord library
https://abal.moe/Eris/
MIT License
1.49k stars 417 forks source link

Reaction buttons dont work it is like it says the thing are not a thing even if it would work it is a outdated way to use it and i would have to make it again #459

Closed MeetPing closed 5 years ago

MeetPing commented 5 years ago

Now how do i turn this to ave reaction buttons i need spoonfeed


const FS = require("fs");
const Client = new eris(process.env.TOKEN);

const prefix = "M5"
var banCommand = "!ban"

Client.on("ready", function() {
  require("http").createServer().listen(process.env.PORT);
  console.log("Ready!");
  Client.editStatus("online", {
    type: 0,
    name: "working labor in "  + Array.from(Client.guilds.values()).length + " servers!"
  });
});

Client.on("messageCreate", function(Message) {
  const args = Message.content.split(" ");
  if (args[0] == prefix + "ping") {
    Client.createMessage(Message.channel.id, "Pong!");
  };

});

Client.connect();```
abalabahaha commented 5 years ago

They do work, and there's an example in the examples folder. Please join the Discord channel linked in the README if you have further support questions.

MeetPing commented 5 years ago

const Eris = require("eris");

// Replace BOT_TOKEN with your bot account's token var bot = new Eris.CommandClient("BOT_TOKEN", {}, { description: "A test bot made with Eris", owner: "somebody", prefix: "!" });

bot.on("ready", () => { // When the bot is ready console.log("Ready!"); // Log "Ready!" });

bot.registerCommand("ping", "Pong!", { // Make a ping command // Responds with "Pong!" when someone says "!ping" description: "Pong!", fullDescription: "This command could be used to check if the bot is up. Or entertainment when you're bored.", reactionButtons: [ // Add reaction buttons to the command { emoji: "⬅", type: "edit", response: (msg) => { // Reverse the message content return msg.content.split().reverse().join(); } }, { emoji: "🔁", type: "edit", // Pick a new pong variation response: ["Pang!", "Peng!", "Ping!", "Pong!", "Pung!"] }, { emoji: "⏹", type: "cancel" // Stop listening for reactions } ], reactionButtonTimeout: 30000 // After 30 seconds, the buttons won't work anymore });

bot.connect(); i tried it says invalid on these this must be old eris

MeetPing commented 5 years ago

this just dosent work

abalabahaha commented 5 years ago

Again, please join the Discord channel linked in the README for code support.