Trying something else
This commit is contained in:
parent
69c5cbbc36
commit
863cb2c25f
2 changed files with 4 additions and 5 deletions
|
@ -60,11 +60,11 @@ class memeCommand extends Command {
|
|||
// Create new graphicsmagick instance
|
||||
fetch(url)
|
||||
.then(res => {
|
||||
const dest = fs.createWriteStream(`${os.tmpdir()}/${message.id}.png`);
|
||||
const dest = fs.createWriteStream(`${os.tmpdir()}/${message.id}.${url.split('.').pop()}`);
|
||||
res.body.pipe(dest);
|
||||
dest.on('finish', async () => {
|
||||
|
||||
let img = gm(`${os.tmpdir()}/${message.id}.png`);
|
||||
let img = gm(`${os.tmpdir()}/${message.id}.${url.split('.').pop()}`);
|
||||
|
||||
// Set some defaults
|
||||
const TOP_TEXT = options[0];
|
||||
|
|
|
@ -77,12 +77,11 @@ class posterCommand extends Command {
|
|||
// Create new graphicsmagick instance
|
||||
fetch(url)
|
||||
.then(res => {
|
||||
const dest = fs.createWriteStream(`${os.tmpdir()}/${message.id}.png`);
|
||||
const dest = fs.createWriteStream(`${os.tmpdir()}/${message.id}.${url.split('.').pop()}`);
|
||||
res.body.pipe(dest);
|
||||
dest.on('finish', async () => {
|
||||
|
||||
let img = gm(`${os.tmpdir()}/${message.id}.png`);
|
||||
|
||||
let img = gm(`${os.tmpdir()}/${message.id}.${url.split('.').pop()}`);
|
||||
// Set some defaults
|
||||
const TOP_TEXT = options[0];
|
||||
const BOTTOM_TEXT = options[1];
|
||||
|
|
Loading…
Reference in a new issue