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:
parent
abd43008b3
commit
452d015955
2 changed files with 2 additions and 1 deletions
|
@ -11,6 +11,7 @@ module.exports = {
|
|||
async execute({ message, args }) {
|
||||
|
||||
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())
|
||||
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) {
|
||||
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})
|
||||
|
|
BIN
resources/tdoss_template.png
Normal file
BIN
resources/tdoss_template.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 412 KiB |
Loading…
Add table
Add a link
Reference in a new issue