Test await

This commit is contained in:
Daniel Odendahl Jr
2017-03-23 12:01:00 +00:00
parent 268f8961b0
commit cea110ce4b
16 changed files with 19 additions and 19 deletions
+4 -4
View File
@@ -21,11 +21,11 @@ module.exports = class YearsCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
if (message.mentions.users.size !== 1) {
message.channel.send(':x: Error! Please mention one user!');
return message.channel.send(':x: Error! Please mention one user!');
}
else {
if (!message.mentions.users.first().avatarURL) {
message.channel.send(":x: Error! This user has no avatar!");
return message.channel.send(":x: Error! This user has no avatar!");
}
else {
let userAvatar = message.mentions.users.first().avatarURL;
@@ -34,12 +34,12 @@ module.exports = class YearsCommand extends commando.Command {
let images = [];
images.push(Jimp.read(userAvatar));
images.push(Jimp.read("./images/3000years.png"));
Promise.all(images).then(([avatar, years]) => {
await Promise.all(images).then(([avatar, years]) => {
avatar.resize(200, 200);
years.blit(avatar, 461, 127);
years.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) throw err;
message.channel.sendFile(buff);
return message.channel.sendFile(buff);
});
});
}
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class DivorceCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *divorces* ${thingToRoleplay}`);
return message.channel.send(`${message.author} *divorces* ${thingToRoleplay}`);
}
};
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class EatCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *eats* ${thingToRoleplay}`);
return message.channel.send(`${message.author} *eats* ${thingToRoleplay}`);
}
};
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class FalconPunchCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *falcon punches* ${thingToRoleplay}`);
return message.channel.send(`${message.author} *falcon punches* ${thingToRoleplay}`);
}
};
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class FistBumpCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *fist-bumps* ${thingToRoleplay} *badalalala*`);
return message.channel.send(`${message.author} *fist-bumps* ${thingToRoleplay} *badalalala*`);
}
};
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class HighFivesCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *high-fives* ${thingToRoleplay}`);
return message.channel.send(`${message.author} *high-fives* ${thingToRoleplay}`);
}
};
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class HitwithShovelCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *hits* ${thingToRoleplay} *with a shovel*`);
return message.channel.send(`${message.author} *hits* ${thingToRoleplay} *with a shovel*`);
}
};
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class HugCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *hugs* ${thingToRoleplay}`);
return message.channel.send(`${message.author} *hugs* ${thingToRoleplay}`);
}
};
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class InhaleCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *inhales* ${thingToRoleplay} *but gained no ability...*`);
return message.channel.send(`${message.author} *inhales* ${thingToRoleplay} *but gained no ability...*`);
}
};
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class KillCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *kills* ${thingToRoleplay}`);
return message.channel.send(`${message.author} *kills* ${thingToRoleplay}`);
}
};
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class KissCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *kisses* ${thingToRoleplay}`);
return message.channel.send(`${message.author} *kisses* ${thingToRoleplay}`);
}
};
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class MarryCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *marries* ${thingToRoleplay}`);
return message.channel.send(`${message.author} *marries* ${thingToRoleplay}`);
}
};
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class PatCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *pats* ${thingToRoleplay}`);
return message.channel.send(`${message.author} *pats* ${thingToRoleplay}`);
}
};
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class PokeCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *pokes* ${thingToRoleplay}`);
return message.channel.send(`${message.author} *pokes* ${thingToRoleplay}`);
}
};
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class PunchCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *punches* ${thingToRoleplay}`);
return message.channel.send(`${message.author} *punches* ${thingToRoleplay}`);
}
};
+1 -1
View File
@@ -17,6 +17,6 @@ module.exports = class SlapCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(`${message.author} *slaps* ${thingToRoleplay}`);
return message.channel.send(`${message.author} *slaps* ${thingToRoleplay}`);
}
};