fix codeblomk

This commit is contained in:
derpystuff 2024-04-16 17:34:49 +02:00
parent c39deb126d
commit 661b2bc41e

View file

@ -1,4 +1,5 @@
const { Utils, Constants } = require("detritus-client"); const { Utils, Constants } = require("detritus-client");
const { codeblock } = require("../../../labscore/utils/markdown");
const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor; const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;
@ -49,7 +50,7 @@ module.exports = {
} }
const max = 1990 - language.length; const max = 1990 - language.length;
if (!args.noreply) { if (!args.noreply) {
const reply = ["```" + language, String(message).slice(0, max), "```"].join("\n") const reply = codeblock(language, [String(message).slice(0, max)])
return context.editOrReply( return context.editOrReply(
reply reply
); );