Update users environment automatically

This commit is contained in:
Jonathan Barrow
2023-02-27 22:04:58 -05:00
parent 99ee7ebe0a
commit 02b6e7cc29

View File

@@ -131,6 +131,7 @@ async function handleStripeEvent(event) {
case 'active':
if (pnid.access_level < 2) { // only change access level if not staff member
updateData.access_level = 1;
updateData.server_access_level = 'test';
}
util.assignDiscordMemberTesterRole(discordId).catch(error => {
@@ -142,6 +143,7 @@ async function handleStripeEvent(event) {
case 'unpaid': // User missed too many payments
if (pnid.access_level < 2) { // only change access level if not staff member
updateData.access_level = 0;
updateData.server_access_level = 'prod';
}
util.removeDiscordMemberTesterRole(discordId).catch(error => {