diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-31 19:20:39 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-31 19:20:39 -0500 |
commit | bab76f38a17c62f8c1477172fe1bc9428efb3843 (patch) | |
tree | 9aee5ed7b54e74735ff417820427c9d2efa984f4 /src/commands/leveling/level.ts | |
parent | 78ab3362a52578d0bcada903732f147747c609df (diff) | |
download | tanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.tar.gz tanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.tar.bz2 tanzanite-bab76f38a17c62f8c1477172fe1bc9428efb3843.zip |
fixes, and breaking changes
Diffstat (limited to 'src/commands/leveling/level.ts')
-rw-r--r-- | src/commands/leveling/level.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/leveling/level.ts b/src/commands/leveling/level.ts index 18648e8..271c3f6 100644 --- a/src/commands/leveling/level.ts +++ b/src/commands/leveling/level.ts @@ -12,7 +12,7 @@ import { import { SimplifyNumber } from '@notenoughupdates/simplify-number'; import assert from 'assert'; import canvas from 'canvas'; -import { ApplicationCommandOptionType, MessageAttachment, Permissions } from 'discord.js'; +import { ApplicationCommandOptionType, MessageAttachment, PermissionFlagsBits } from 'discord.js'; import got from 'got'; import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; @@ -51,7 +51,7 @@ export default class LevelCommand extends BushCommand { if (!(await message.guild.hasFeature('leveling'))) return await message.util.reply( `${util.emojis.error} This command can only be run in servers with the leveling feature enabled.${ - message.member?.permissions.has(Permissions.FLAGS.MANAGE_GUILD) + message.member?.permissions.has(PermissionFlagsBits.ManageGuild) ? ` You can toggle features using the \`${util.prefix(message)}features\` command.` : '' }` @@ -96,7 +96,7 @@ export default class LevelCommand extends BushCommand { ctx.fillRect(0, 0, levelCard.width, levelCard.height); // Draw avatar const AVATAR_SIZE = 128; - const avatarBuffer = await got.get(user.displayAvatarURL({ format: 'png', size: AVATAR_SIZE })).buffer(); + const avatarBuffer = await got.get(user.displayAvatarURL({ extension: 'png', size: AVATAR_SIZE })).buffer(); const avatarImage = new canvas.Image(); avatarImage.src = avatarBuffer; const imageTopCoord = levelCard.height / 2 - AVATAR_SIZE / 2; |