feat: impact font on megamind

This commit is contained in:
2022-11-28 16:21:19 +01:00
parent 4fcded099d
commit 0606b6dab2
4 changed files with 20 additions and 4 deletions

View File

@@ -1,5 +1,8 @@
FROM node:lts-alpine
RUN apk add bash ffmpeg msttcorefonts-installer fontconfig
RUN update-ms-fonts && fc-cache -f
WORKDIR /app
COPY package.json ./
@@ -8,8 +11,6 @@ RUN npm i
EXPOSE 7272
RUN apk update && apk add bash ffmpeg ttf-freefont
COPY . .
RUN npm run build

View File

@@ -24,7 +24,7 @@ export default commandModule({
],
execute: async (ctx, options) => {
const option = options[1].getString('texto', true)
if (option.length > 26) return await ctx.reply({content: `El texto es muy largo, intenta que sea menor que 26 caracteres.`, ephemeral: true})
if (option.length > 15) return await ctx.reply({content: `El texto es muy largo, intenta que sea menor que 15 caracteres.`, ephemeral: true})
await ctx.reply({content: 'Cargando...'})
@@ -37,7 +37,7 @@ export default commandModule({
context.drawImage(background, 0, 0, canvas.width, canvas.height)
const text = `No ${option}?`
context.font = '40px Ubuntu'
context.font = '40px Impact'
context.fillStyle = 'red'
context.textAlign = 'center'
context.textBaseline = 'middle'

14
package-lock.json generated
View File

@@ -15,6 +15,7 @@
"@napi-rs/canvas": "^0.1.30",
"@sern/handler": "^1.2.1",
"axios": "^1.0.0",
"country-flag-emoji": "^1.0.3",
"dayjs": "^1.11.6",
"discord-bot-youtube-notifications": "^1.1.4",
"discord-tictactoe": "^4.0.0",
@@ -914,6 +915,14 @@
"version": "1.0.6",
"license": "MIT"
},
"node_modules/country-flag-emoji": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/country-flag-emoji/-/country-flag-emoji-1.0.3.tgz",
"integrity": "sha512-OVMltN9rF8Rd9fjDzcNAT376fslwlkTuu+BeqzY4Z+kr+nF/3u4Kod5SyEKuABxwvi6tWO7uszO3MgWzoevAuQ==",
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/create-require": {
"version": "1.1.1",
"dev": true,
@@ -3948,6 +3957,11 @@
"cookie-signature": {
"version": "1.0.6"
},
"country-flag-emoji": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/country-flag-emoji/-/country-flag-emoji-1.0.3.tgz",
"integrity": "sha512-OVMltN9rF8Rd9fjDzcNAT376fslwlkTuu+BeqzY4Z+kr+nF/3u4Kod5SyEKuABxwvi6tWO7uszO3MgWzoevAuQ=="
},
"create-require": {
"version": "1.1.1",
"dev": true

View File

@@ -33,6 +33,7 @@
"@napi-rs/canvas": "^0.1.30",
"@sern/handler": "^1.2.1",
"axios": "^1.0.0",
"country-flag-emoji": "^1.0.3",
"dayjs": "^1.11.6",
"discord-bot-youtube-notifications": "^1.1.4",
"discord-tictactoe": "^4.0.0",