mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 13:56:25 +02:00
Test await
This commit is contained in:
@@ -21,11 +21,11 @@ module.exports = class YearsCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
if (message.mentions.users.size !== 1) {
|
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 {
|
else {
|
||||||
if (!message.mentions.users.first().avatarURL) {
|
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 {
|
else {
|
||||||
let userAvatar = message.mentions.users.first().avatarURL;
|
let userAvatar = message.mentions.users.first().avatarURL;
|
||||||
@@ -34,12 +34,12 @@ module.exports = class YearsCommand extends commando.Command {
|
|||||||
let images = [];
|
let images = [];
|
||||||
images.push(Jimp.read(userAvatar));
|
images.push(Jimp.read(userAvatar));
|
||||||
images.push(Jimp.read("./images/3000years.png"));
|
images.push(Jimp.read("./images/3000years.png"));
|
||||||
Promise.all(images).then(([avatar, years]) => {
|
await Promise.all(images).then(([avatar, years]) => {
|
||||||
avatar.resize(200, 200);
|
avatar.resize(200, 200);
|
||||||
years.blit(avatar, 461, 127);
|
years.blit(avatar, 461, 127);
|
||||||
years.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
years.getBuffer(Jimp.MIME_PNG, (err, buff) => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
message.channel.sendFile(buff);
|
return message.channel.sendFile(buff);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class DivorceCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||||
message.channel.send(`${message.author} *divorces* ${thingToRoleplay}`);
|
return message.channel.send(`${message.author} *divorces* ${thingToRoleplay}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class EatCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||||
message.channel.send(`${message.author} *eats* ${thingToRoleplay}`);
|
return message.channel.send(`${message.author} *eats* ${thingToRoleplay}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class FalconPunchCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
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}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class FistBumpCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
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*`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class HighFivesCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
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}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class HitwithShovelCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
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*`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class HugCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||||
message.channel.send(`${message.author} *hugs* ${thingToRoleplay}`);
|
return message.channel.send(`${message.author} *hugs* ${thingToRoleplay}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class InhaleCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
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...*`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class KillCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||||
message.channel.send(`${message.author} *kills* ${thingToRoleplay}`);
|
return message.channel.send(`${message.author} *kills* ${thingToRoleplay}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class KissCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||||
message.channel.send(`${message.author} *kisses* ${thingToRoleplay}`);
|
return message.channel.send(`${message.author} *kisses* ${thingToRoleplay}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class MarryCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||||
message.channel.send(`${message.author} *marries* ${thingToRoleplay}`);
|
return message.channel.send(`${message.author} *marries* ${thingToRoleplay}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class PatCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||||
message.channel.send(`${message.author} *pats* ${thingToRoleplay}`);
|
return message.channel.send(`${message.author} *pats* ${thingToRoleplay}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class PokeCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||||
message.channel.send(`${message.author} *pokes* ${thingToRoleplay}`);
|
return message.channel.send(`${message.author} *pokes* ${thingToRoleplay}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class PunchCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||||
message.channel.send(`${message.author} *punches* ${thingToRoleplay}`);
|
return message.channel.send(`${message.author} *punches* ${thingToRoleplay}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ module.exports = class SlapCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||||
message.channel.send(`${message.author} *slaps* ${thingToRoleplay}`);
|
return message.channel.send(`${message.author} *slaps* ${thingToRoleplay}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user