aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moulberry-bush/neuRepo.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/moulberry-bush/neuRepo.ts')
-rw-r--r--src/commands/moulberry-bush/neuRepo.ts11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/commands/moulberry-bush/neuRepo.ts b/src/commands/moulberry-bush/neuRepo.ts
index fcb6f23..4baae7d 100644
--- a/src/commands/moulberry-bush/neuRepo.ts
+++ b/src/commands/moulberry-bush/neuRepo.ts
@@ -1,5 +1,5 @@
import { BushCommand, clientSendAndPermCheck, type ArgType, type CommandMessage, type SlashMessage } from '#lib';
-import canvas from 'canvas';
+import canvas from '@napi-rs/canvas';
import {
ApplicationCommandOptionType,
AttachmentBuilder,
@@ -7,9 +7,8 @@ import {
CacheType,
PermissionFlagsBits
} from 'discord.js';
-import { dirname, join } from 'path';
+import { join } from 'path';
import tinycolor from 'tinycolor2';
-import { fileURLToPath } from 'url';
import { formattingInfo, RawNeuItem } from '../../../lib/utils/Minecraft.js';
export default class NeuRepoCommand extends BushCommand {
@@ -66,10 +65,6 @@ export default class NeuRepoCommand extends BushCommand {
}
public toolTip(item: RawNeuItem): Buffer {
- canvas.registerFont(join(dirname(fileURLToPath(import.meta.url)), '..', '..', '..', '..', 'assets', 'Faithful.ttf'), {
- family: 'Faithful'
- });
-
const background = '#100010';
const width = 250;
@@ -143,7 +138,7 @@ export default class NeuRepoCommand extends BushCommand {
item.displayname.split('');
- return itemRender.toBuffer();
+ return itemRender.toBuffer('image/png');
}
// stolen from NEU and modified