Don't rely on lavacord eris helper package, another pagination fix attempt, make cowsay use a different lib
This commit is contained in:
parent
45bb53d521
commit
2499fb2a3b
7 changed files with 4705 additions and 671 deletions
|
@ -28,7 +28,7 @@ Default prefix is \`&\`.
|
|||
general: ["## 💻 General"],
|
||||
tags: ["## 🏷️ Tags"],
|
||||
fun: ["## 👌 Fun"],
|
||||
images: ["## 🖼️ Image Editing", "> These commands support the PNG, JPEG, WEBP, and GIF formats. (GIF support is currently experimental)\n"],
|
||||
images: ["## 🖼️ Image Editing", "> These commands support the PNG, JPEG, WEBP, and GIF formats.\n"],
|
||||
soundboard: ["## 🔊 Soundboard"],
|
||||
music: ["## 🎤 Music"]
|
||||
};
|
||||
|
|
|
@ -50,8 +50,13 @@ module.exports = async (message, pages, timeout = 120000) => {
|
|||
}
|
||||
});
|
||||
reactionCollector.once("end", async () => {
|
||||
if (currentPage.channel.messages.get(currentPage.id) && manageMessages) {
|
||||
await currentPage.removeReactions();
|
||||
try {
|
||||
await currentPage.channel.getMessage(currentPage.id);
|
||||
if (manageMessages) {
|
||||
await currentPage.removeReactions();
|
||||
}
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
});
|
||||
return currentPage;
|
||||
|
|
|
@ -4,7 +4,7 @@ const paginator = require("./pagination/pagination.js");
|
|||
const fetch = require("node-fetch");
|
||||
const moment = require("moment");
|
||||
require("moment-duration-format");
|
||||
const { Manager } = require("@lavacord/eris");
|
||||
const { Manager } = require("lavacord");
|
||||
|
||||
let nodes = require("../servers.json").lava;
|
||||
|
||||
|
@ -35,8 +35,14 @@ exports.checkStatus = async () => {
|
|||
};
|
||||
|
||||
exports.connect = async () => {
|
||||
this.manager = new Manager(client, nodes, {
|
||||
user: client.user.id
|
||||
this.manager = new Manager(nodes, {
|
||||
user: client.user.id,
|
||||
shards: client.shards.size || 1,
|
||||
send: (packet) => {
|
||||
const guild = client.guilds.get(packet.d.guild_id);
|
||||
if (!guild) return;
|
||||
return guild.shard.sendWS(packet.op, packet.d);
|
||||
}
|
||||
});
|
||||
const { length } = await this.manager.connect();
|
||||
logger.log(`Successfully connected to ${length} Lavalink node(s).`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue