Update users environment automatically

This commit is contained in:
Jonathan Barrow 2023-02-27 19:24:31 -05:00
parent 112e90f9b8
commit 21c0791b65
No known key found for this signature in database
GPG Key ID: E86E9FE9049C741F

View File

@ -132,6 +132,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'; // * Set users to the test environment by default
}
util.assignDiscordMemberTesterRole(discordId).catch(error => {
@ -143,6 +144,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 => {