Add resource file to repo
All checks were successful
CI / CI (push) Successful in 1m22s

Adding this file to the repo so that I don't need to manually upload it
to the server the bot is running in.
This commit is contained in:
SileNce5k 2025-05-10 15:57:01 +02:00
parent abd43008b3
commit 452d015955
Signed by: SileNce
GPG key ID: B0A142BB4291B204
2 changed files with 2 additions and 1 deletions

View file

@ -11,6 +11,7 @@ module.exports = {
async execute({ message, args }) { async execute({ message, args }) {
let tdossDir = path.resolve(process.cwd(), 'data', 'tdoss'); let tdossDir = path.resolve(process.cwd(), 'data', 'tdoss');
const tdossTemplate = path.resolve(process.cwd(), 'resources', 'tdoss_template.png');
const directory = path.resolve(tdossDir, Math.floor(new Date).toString()) const directory = path.resolve(tdossDir, Math.floor(new Date).toString())
fs.mkdirSync(directory, {recursive: true}) fs.mkdirSync(directory, {recursive: true})
@ -59,7 +60,7 @@ module.exports = {
} }
const command = `magick ${tdossDir}/tdoss_template.png \\( ${directory}/input.png -resize 800x800^ -gravity center -extent 1000x1000 \\) -compose dst-over -composite ${directory}/tdoss_result.png`; const command = `magick ${tdossTemplate} \\( ${directory}/input.png -resize 800x800^ -gravity center -extent 1000x1000 \\) -compose dst-over -composite ${directory}/tdoss_result.png`;
if (this.executeCommand(command).error === true) { if (this.executeCommand(command).error === true) {
message.channel.send("Something went wrong during image manipulation.\nTry again and if it keeps happening, contact the owner of the bot.") message.channel.send("Something went wrong during image manipulation.\nTry again and if it keeps happening, contact the owner of the bot.")
fs.rmSync(`${directory}`, {recursive: true}) fs.rmSync(`${directory}`, {recursive: true})

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 KiB