diff --git a/application.yml b/application.yml index 939e46b..ee7d5c3 100644 --- a/application.yml +++ b/application.yml @@ -11,7 +11,7 @@ lavalink: twitch: true vimeo: true mixer: true - http: false + http: true local: true bufferDurationMs: 400 youtubePlaylistLoadLimit: 6 # Number of pages at 100 each @@ -26,7 +26,7 @@ lavalink: #searchTriggersFail: true # Whether a search 429 should trigger marking the ip as failing #retryLimit: -1 # -1 = use default lavaplayer value | 0 = infinity | >0 = retry will happen this numbers times plugins: - - dependency: "com.github.esmBot:lava-xm-plugin:v0.1.0" + - dependency: "com.github.esmBot:lava-xm-plugin:v0.2.0" repository: "https://jitpack.io" - dependency: "com.github.Topis-Lavalink-Plugins:Topis-Source-Managers-Plugin:v2.0.7" repository: "https://jitpack.io" diff --git a/commands/music/nowplaying.js b/commands/music/nowplaying.js index 671e8cc..5b76847 100644 --- a/commands/music/nowplaying.js +++ b/commands/music/nowplaying.js @@ -42,7 +42,7 @@ class NowPlayingCommand extends MusicCommand { } static description = "Shows the currently playing song"; - static aliases = ["playing", "np"]; + static aliases = ["playing", "np", "current"]; } export default NowPlayingCommand; diff --git a/docs/setup.md b/docs/setup.md index 263b508..bd834fe 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -46,7 +46,7 @@ Choose the distro you're using below for insallation instructions. [libvips](https://github.com/libvips/libvips) is the core of esmBot's image processing commands. The latest version (8.13.0) is recommended because it contains fixes to GIF handling and support for the freeze command; however, this version isn't packaged for most distros yet. To fix this, you'll need to build libvips from source. !!! note - Alpine and Arch users can skip this step, since both distros now have 8.13.0 packaged. + Alpine, Arch, and RHEL **(not Fedora!)** users can skip this step, since these distros now have 8.13.0 packaged. First, download the source and move into it: ```sh diff --git a/utils/collections.js b/utils/collections.js index 43bcfa7..ced45a3 100644 --- a/utils/collections.js +++ b/utils/collections.js @@ -16,7 +16,7 @@ class TimedMap extends Map { export const runningCommands = new TimedMap(); -/*class Cache extends Map { +class Cache extends Map { constructor(values) { super(values); this.maxValues = 2048; @@ -26,8 +26,8 @@ export const runningCommands = new TimedMap(); super.set(key, value); if (this.size > this.maxValues) this.delete(this.keys().next().value); } -}*/ +} -export const prefixCache = new Map(); -export const disabledCache = new Map(); -export const disabledCmdCache = new Map(); \ No newline at end of file +export const prefixCache = new Cache(); +export const disabledCache = new Cache(); +export const disabledCmdCache = new Cache(); \ No newline at end of file diff --git a/utils/image-runner.js b/utils/image-runner.js index b29a011..23387bc 100644 --- a/utils/image-runner.js +++ b/utils/image-runner.js @@ -7,7 +7,7 @@ import { fileURLToPath } from "url"; const nodeRequire = createRequire(import.meta.url); const relPath = `../build/${process.env.DEBUG && process.env.DEBUG === "true" ? "Debug" : "Release"}/image.node`; -const magick = nodeRequire(relPath); +const img = nodeRequire(relPath); const enumMap = { "forget": 0, @@ -33,7 +33,7 @@ export default function run(object) { }); promise = request(object.path).then(res => res.body.arrayBuffer()).then(buf => Buffer.from(buf)); } - // Convert from a MIME type (e.g. "image/png") to something ImageMagick understands (e.g. "png"). + // Convert from a MIME type (e.g. "image/png") to something the image processor understands (e.g. "png"). // Don't set `type` directly on the object we are passed as it will be read afterwards. // If no image type is given (say, the command generates its own image), make it a PNG. const fileExtension = object.params.type ? object.params.type.split("/")[1] : "png"; @@ -47,7 +47,7 @@ export default function run(object) { } objectWithFixedType.basePath = path.join(path.dirname(fileURLToPath(import.meta.url)), "../"); try { - const result = magick[object.cmd](objectWithFixedType); + const result = img[object.cmd](objectWithFixedType); const returnObject = { buffer: result.data, fileExtension: result.type diff --git a/utils/services/image.js b/utils/services/image.js index 876b7c5..62744e4 100644 --- a/utils/services/image.js +++ b/utils/services/image.js @@ -11,7 +11,9 @@ import EventEmitter from "events"; // only requiring this to work around an issue regarding worker threads const nodeRequire = createRequire(import.meta.url); -nodeRequire(`../../build/${process.env.DEBUG && process.env.DEBUG === "true" ? "Debug" : "Release"}/image.node`); +if (process.env.API_TYPE === "none") { + nodeRequire(`../../build/${process.env.DEBUG && process.env.DEBUG === "true" ? "Debug" : "Release"}/image.node`); +} import ImageConnection from "../imageConnection.js";