Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@
"quota-fail": "❌ Quota Not Met",
"duty-time-title": "Shift Time - %type",
"duty-time-desc": "**Total Shifts:** %count\n**Total Duration:** %duration",
"btn-hist": "View History",
"btn-hist": "View Shift History",
"err-no-lb": "ℹ️ No shift data found for **%type**.",
"duty-lb-title": "Leaderboard - %type",
"duty-lb-desc": "**%lookback Top Shifts**\n\n%lines",
Expand All @@ -1084,7 +1084,6 @@
"err-not-on": "❌ You are not on a shift.",
"err-hist-oth": "❌ You can only view your own history.",
"mod-v-all-title": "Confirm: Void All Shifts",
"mod-v-all-lbl": "Type CONFIRM to delete all shift data",
"err-conf-fail": "❌ Data deletion confirmation failed. You must type the phrase exactly.",
"succ-v-all": "All shift data for <@%user> has been deleted successfully.",
"mod-add-t": "Add Duty Time",
Expand All @@ -1099,25 +1098,25 @@
"err-no-perm": "❌ You do not have permission to do this.",
"err-no-mem": "❌ Could not find that member.",
"ph-sel-type": "Select a Shift Type",
"msg-sel-type": "👇 Please choose your shift type:",
"msg-sel-type": "👇 Please choose your shift type below:",
"err-prof-dis": "❌ Staff Profiles are disabled.",
"err-prof-cfg": "❌ Configuration is missing. Please make sure the message is not empty.",
"err-prof-cfg": "❌ Configuration is missing. Please make sure that the message is not empty.",
"err-prof-no-own": "❌ You do not have a staff profile.",
"err-prof-no-tgt": "❌ That user does not have a profile.",
"rev-dis-text": "*Reviews disabled*",
"err-prof-no-tgt": "❌ That user does not have a staff profile.",
"rev-dis-text": "*Reviews are disabled*",
"rev-no-rate": "No ratings yet",
"stat-offl": "⚫ Offline",
"stat-onl": "🟢 Online",
"stat-idl": "🟡 Away",
"stat-dnd": "🔴 Do Not Disturb",
"stat-prof-ond": "⏱️ On duty",
"stat-prof-loa": "🌙 On LoA",
"stat-prof-ra": "⛱️ On RA",
"prof-no-intro": "*No introduction set.*",
"stat-prof-loa": "🌙 On Leave Of Absence (LOA)",
"stat-prof-ra": "⛱️ On Reduced Activity (RA)",
"prof-no-intro": "😕 *This user did not set an introduction.*",
"err-prof-empty": "❌ Profile embed is empty.",
"err-prof-perm": "❌ You must be a staff member to have a profile.",
"prof-edit-title": "Edit Profile",
"prof-edit-nick": "Custom Nickname",
"prof-edit-nick": "Your custom nickname",
"prof-edit-intro": "Introduction",
"succ-prof-wipe": "✅ Profile wiped for %u.",
"succ-prof-upd": "✅ Profile updated!",
Expand All @@ -1138,7 +1137,7 @@
"succ-del-all": "✅ ALL data has been permanently wiped.",
"err-del-time": "⏳ Data deletion timed out.",
"succ-del-tgt": "✅ Target data has been permanently wiped.",
"err-gen-no-perm": "❌ You do not have permission.",
"err-gen-no-perm": "❌ You do not have permission to do this.",
"err-no-req": "❌ Request not found.",
"err-req-hndl": "❌ Request is already %status.",
"mod-deny-req": "Deny Request",
Expand Down Expand Up @@ -1167,8 +1166,8 @@
"log-info-hdr": "%label Information",
"general-start": "Start",
"general-end": "End",
"log-end-title": "%label ended for %username",
"log-end-desc": "%label ended for %mention.",
"log-end-title": "%username's %label has ended.",
"log-end-desc": "%mention's %label has ended.",
"general-started": "Started",
"general-ended": "Ended",
"log-adj-title": "%label adjusted for %username",
Expand Down Expand Up @@ -1434,6 +1433,7 @@
"log-duty-log-fail": "[Staff Management] Failed to log duty change (%action): %error",
"err-self-infract": "That's not in the code... well, it's more of a guideline anyway. Still no.\n-# You cannot infract yourself",
"err-self-promo": "You can't promote yourself through a black hole of audacity and expect it to work.",
"status-expired-auto": "Ended automatically because the status expired."
"status-expired-auto": "Ended automatically because the status expired.",
"label-system": "System"
}
}
2 changes: 1 addition & 1 deletion modules/staff-management-system/commands/duty.js
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ async function handleDutyAdminVoidAll(client, interaction) {
new ActionRowBuilder().addComponents(
new TextInputBuilder()
.setCustomId('confirm')
.setLabel(localize('staff-management-system', 'mod-v-all-lbl'))
.setLabel(localize('staff-management-system', 'mod-del-lbl'))
.setStyle(TextInputStyle.Short)
.setPlaceholder(confirmPhrase)
.setRequired(true)
Expand Down
12 changes: 6 additions & 6 deletions modules/staff-management-system/commands/staff-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ async function handleStatusEndSubmit(client, interaction, type) {
flags: MessageFlags.Ephemeral
});
}
await interaction.deferUpdate();

const meta = getStatusMeta(type);
const request = await client.models['staff-management-system']['LoaRequest'].findByPk(interaction.customId.split('_')[2]);
Expand Down Expand Up @@ -574,10 +575,9 @@ async function handleStatusEndSubmit(client, interaction, type) {
.setEmoji('📜')
.setStyle(ButtonStyle.Secondary)
);
return interaction.reply({
return interaction.editReply({
embeds: [updatedEmbed.toJSON()],
components: [disabledRow.toJSON()],
flags: MessageFlags.Ephemeral
components: [disabledRow.toJSON()]
});
}

Expand Down Expand Up @@ -662,6 +662,7 @@ async function handleStatusExtendSubmit(client, interaction, type) {
flags: MessageFlags.Ephemeral
});
}
await interaction.deferUpdate();

const meta = getStatusMeta(type);
const request = await client.models['staff-management-system']['LoaRequest'].findByPk(interaction.customId.split('_')[2]);
Expand Down Expand Up @@ -719,10 +720,9 @@ async function handleStatusExtendSubmit(client, interaction, type) {
r: request.reason || localize('staff-management-system', 'info-none')
})
});
return interaction.reply({
return interaction.editReply({
embeds: [updatedEmbed.toJSON()],
components: interaction.message.components.map(c => c.toJSON()),
flags: MessageFlags.Ephemeral
components: interaction.message.components.map(c => c.toJSON())
});
}

Expand Down
97 changes: 93 additions & 4 deletions modules/staff-management-system/configs/activity-checks.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"name": "enableActivityChecks",
"category": "general",
"humanName": "Enable Activity Checks",
"description": "Allows admins to start an activity check to see who is active.",
"description": "Allows admins to start an activity check to see who is active, and also set automatic activity checks.",
"type": "boolean",
"default": true,
"elementToggle": true
Expand Down Expand Up @@ -69,12 +69,101 @@
{
"name": "duration",
"description": "The configured duration in hours."
},
{
"name": "staff-mention",
"description": "Mention of the configured staff role(s)."
},
{
"name": "supervisor-mention",
"description": "Mention of the configured supervisor role(s)."
},
{
"name": "management-mention",
"description": "Mention of the configured management role(s)."
},
{
"name": "initiator",
"description": "The user who iniated the activity check. This will show 'system' if it was an automated check."
}
],
"default": {
"_schema": "v3",
"content": "%staff-mention%",
"embeds": [
{
"author": {
"name": "Signed, %initiator%"
},
"title": "📋 Staff Activity Check",
"description": "Please confirm your activity by clicking the button below before %end-time%. This activity check will stay open for %duration% hour(s), and members who do not respond before it ends may be marked as failed unless they qualify for an exception.",
"fields": [
{
"name": "Quick info overview",
"value": "Ends at: %end-time%\nDuration: %duration% hour(s)"
}
],
"color": "#3498db"
}
]
}
},
{
"name": "endCheckMessage",
"category": "general",
"humanName": "Ended Activity Check Embed",
"description": "The message that will replace the activity check embed when it ends.",
"type": "string",
"allowEmbed": true,
"params": [
{
"name": "end-time",
"description": "The Discord timestamp when the check ended."
},
{
"name": "duration",
"description": "The configured duration in hours."
},
{
"name": "staff-mention",
"description": "Mention of the configured staff role(s)."
},
{
"name": "supervisor-mention",
"description": "Mention of the configured supervisor role(s)."
},
{
"name": "management-mention",
"description": "Mention of the configured management role(s)."
},
{
"name": "initiator",
"description": "The user who iniated the activity check. This will show 'system' if it was an automated check."
},
{
"name": "responded-count",
"description": "The number or staff members who responed to the activity check."
}
],
"default": {
"title": "📋 Staff Activity Check",
"description": "Please click the button below to confirm your activity before %endtime%.",
"color": "#3498db"
"_schema": "v3",
"content": "%staff-mention%",
"embeds": [
{
"author": {
"name": "Signed, %initiator%"
},
"title": "📋 Staff Activity Check (ended)",
"description": "This activity check has concluded.",
"fields": [
{
"name": "Quick info overview",
"value": "Ended at: %end-time%\nDuration: %duration% hour(s)\nTotal responses: %responded-count%"
}
],
"color": "#FF0000"
}
]
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion modules/staff-management-system/configs/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"name": "supervisorRoles",
"category": "roles",
"humanName": "Supervisor Roles",
"description": "Roles that can manage other staff members (Approve/Deny/Manage LoA's and RA's, Manage Shifts, promote and infract users).",
"description": "Roles that can manage other staff members (Approve/Deny/Manage LoA's and RA's, Manage Shifts etc.).",
"type": "array",
"content": "roleID",
"default": []
Expand Down
26 changes: 13 additions & 13 deletions modules/staff-management-system/configs/infractions.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,23 @@
"Under Investigation"
]
},
{
"name": "infractionLogChannel",
"category": "messages",
"humanName": "Infraction Log Channel",
"description": "Where should infractions and suspensions be announced?",
"type": "channelID",
"channelTypes": [
"GUILD_TEXT",
"GUILD_NEWS"
],
"default": ""
},
{
"name": "enableSuspensions",
"category": "suspensions",
"humanName": "Enable Suspensions System",
"description": "Suspensions temporarily strip a staff member of their roles.",
"description": "Suspensions temporarily strip a staff member of their roles, and give them back after the specified duration.",
"type": "boolean",
"default": true
},
Expand Down Expand Up @@ -137,18 +149,6 @@
]
}
},
{
"name": "infractionLogChannel",
"category": "messages",
"humanName": "Infraction Log Channel",
"description": "Where should infractions and suspensions be announced?",
"type": "channelID",
"channelTypes": [
"GUILD_TEXT",
"GUILD_NEWS"
],
"default": ""
},
{
"name": "infractionMessage",
"category": "messages",
Expand Down
4 changes: 2 additions & 2 deletions modules/staff-management-system/configs/promotions.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"name": "enablePromotions",
"category": "logic",
"humanName": "Enable Promotions System",
"description": "If disabled, the /staff-management promote command will not work.",
"description": "Enabling this allows staff members to promote users to higher ranks.",
"type": "boolean",
"default": true,
"elementToggle": true
Expand All @@ -30,7 +30,7 @@
"humanName": "Auto-Add New Role?",
"description": "If enabled, the bot will automatically give the user the new rank role. Note: This makes your server prone to raids by promoting someone to a role with more dangerous permissions which can be used to do malicious actions. It is recommended to keep this setting disabled.",
"type": "boolean",
"default": true
"default": false
},
{
"name": "promotionsChannel",
Expand Down
8 changes: 4 additions & 4 deletions modules/staff-management-system/configs/reviews.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"name": "enableReviews",
"category": "settings",
"humanName": "Enable Reviews System",
"description": "Enabling this unlocks the staff review system, allowing users to submit ratings and feedback for staff members.",
"description": "Enabling this unlocks the staff review system, allowing users to submit ratings with feedback for staff members.",
"type": "boolean",
"default": true
},
Expand All @@ -39,15 +39,15 @@
"name": "allowSelfRating",
"category": "settings",
"humanName": "Allow Self-Rating?",
"description": "If enabled, staff can review themselves. This is not recommended to keep a fair ratings system.",
"description": "If enabled, staff can review themselves. This is not recommended to keep a fair review system.",
"type": "boolean",
"default": false
},
{
"name": "onlyAllowStaffReview",
"category": "settings",
"humanName": "Only let users review staff",
"description": "If enabled, only staff members can review other staff members.",
"description": "If enabled, users can only review staff members.",
"type": "boolean",
"default": true
},
Expand Down Expand Up @@ -92,7 +92,7 @@
],
"default": {
"_schema": "v3",
"content": "%staff%",
"content": "%staff-mention%",
"embeds": [
{
"title": "🌟 New Staff Rating",
Expand Down
Loading
Loading