Skip to content

Commit

Permalink
Add last deny reason, resolves #249
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinaisslaying committed Mar 23, 2024
1 parent b5e01dd commit 95663aa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions @types/del.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ declare global {
longDesc: string;
modNotes: string;
reviewNotes: reviewNote[];
lastDenyReason: string;
editors: string[];
commands: APIApplicationCommand[];
userFlags?: UserFlags;
Expand Down
3 changes: 2 additions & 1 deletion src/Routes/bots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3528,7 +3528,8 @@ router.post(
{
$set: {
vanityUrl: "",
"status.archived": true
lastDenyReason: req.body.reason,
"status.archived": true,
}
}
);
Expand Down
19 changes: 16 additions & 3 deletions views/templates/bots/view.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -596,10 +596,10 @@
</div>
<br />
<% if (req.user) { %>
<% if (req.user.db.rank.mod === true) { %>
<% if (bot.modNotes && bot.status.approved === false) { %>
<% if (req.user.db.rank.mod === true) && bot.status.approved === false { %>
<% if (bot.modNotes) { %>
<div class="container">
<article class="message is-default">
<article class="message is-warning">
<div class="message-header">
<p style="color: <%= foreground %>;"><%= __("page.bots.modNotes.view") %></p>
</div>
Expand All @@ -610,6 +610,19 @@
</div>
<br />
<% } %>
<% if (bot.lastDenyReason) { %>
<div class="container">
<article class="message is-danger">
<div class="message-header">
<p style="color: <%= foreground %>;"><%= __("page.bots.lastDenyReason.view") %></p>
</div>
<div class="message-body" style="background-color: black; color <%= foreground %>;">
<%= bot.lastDenyReason %>
</div>
</article>
</div>
<br />
<% } %>
<% } %>
<% } %>
</div>
Expand Down

0 comments on commit 95663aa

Please sign in to comment.