renamed command name

This commit is contained in:
loicbersier 2018-10-14 22:27:19 +02:00
parent 9157fa8b49
commit 4b9ec490e3

View file

@ -14,7 +14,7 @@ module.exports = class idubbbzCommand extends Command {
description: `Put the text you send in idubbbz piece of paper`,
args: [
{
key: 'test',
key: 'text',
prompt: 'What do you the paper to say?',
type: 'string',
default: 'Nigger Faggot'
@ -23,7 +23,7 @@ module.exports = class idubbbzCommand extends Command {
});
}
async run(message, { test }) {
async run(message, { text }) {
let Attachment = (message.attachments).array();
let image = null
if (!Attachment[0])
@ -53,9 +53,9 @@ module.exports = class idubbbzCommand extends Command {
const { body: buffer } = await superagent.get('https://image.noelshack.com/fichiers/2018/41/7/1539510207-untitled.png');
const bg = await loadImage(buffer);
ctx.drawImage(bg, 0, 0, canvas.width, canvas.height);
ctx.font = applyText(canvas, test)
ctx.font = applyText(canvas, text)
ctx.fillStyle = '#000000';
ctx.fillText(test, canvas.width / 2.1, canvas.height / 1.5);
ctx.fillText(text, canvas.width / 2.1, canvas.height / 1.5);
const attachment = new Discord.Attachment(canvas.toBuffer(), 'edups.png');