src/user/info.js
Function exports
has 110 lines of code (exceeds 75 allowed). Consider refactoring. Open
Open
module.exports = function (User) {
User.getLatestBanInfo = async function (uid) {
// Simply retrieves the last record of the user's ban, even if they've been unbanned since then.
const record = await db.getSortedSetRevRange(`uid:${uid}:bans:timestamp`, 0, 0);
if (!record.length) {