module.exports = async function имя1(params) {
try {
const response = await request(params);
let charset = [];
charset.name = response.data;
const charsetResult = await someFunc(charset);
if (charsetResult.value === undefined) {
charsetResult.value = 'PR10';
} else {
charsetResult.guild = charset.guild.name;
}
return charsetResult;
} catch (error) {
console.log(error);
};
}
user.aggregate([...])
где user = new mongoose.Schema('User')