mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-29 13:17:56 +00:00
Keep warns in /unban
This commit is contained in:
parent
93ff9a7225
commit
0ea1e0064e
@ -130,7 +130,7 @@ const unban = ({ id }) =>
|
|||||||
User.update(
|
User.update(
|
||||||
{ id },
|
{ id },
|
||||||
{
|
{
|
||||||
$set: { status: 'member', warns: [] },
|
$set: { status: 'member' },
|
||||||
$unset: { ban_details: true, ban_reason: true },
|
$unset: { ban_details: true, ban_reason: true },
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -156,7 +156,7 @@ const unwarn = ({ id }, warnQuery) =>
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const nowarns = unban;
|
const nowarns = query => unwarn(query, {});
|
||||||
|
|
||||||
const getWarns = ({ id }) =>
|
const getWarns = ({ id }) =>
|
||||||
User.findOne({ id })
|
User.findOne({ id })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user