Skip to content

Commit

Permalink
Fix CDBL
Browse files Browse the repository at this point in the history
Signed-off-by: cobalt <61329810+RedGuy12@users.noreply.github.com>
  • Loading branch information
cobaltt7 committed Jul 24, 2024
1 parent c1745b9 commit 53265a9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
curl "https://gist.githubusercontent.com/${{ secrets.PRIVATE_GIST
}}/raw/strings.ts" --output common/strings.ts

- name: Touch .env
run: touch .env

- name: Checkout images
run: git clone https://gist.github.com/${{ secrets.IMAGES_GIST }}.git .private/images

Expand Down
1 change: 1 addition & 0 deletions common/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ export async function cleanListeners(): Promise<void> {
export async function prepareExit(): Promise<void> {
await cleanListeners();
client.user.setStatus("dnd");
process.emitWarning("prepare-exit called");
await client.destroy();
}

Expand Down
2 changes: 1 addition & 1 deletion modules/reminders/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ async function sendReminders(): Promise<NodeJS.Timeout | undefined> {
continue;
}
case SpecialReminders.RebootBot: {
await prepareExit();
process.emitWarning(`${client.user.tag} is killing the bot`);
await prepareExit();
process.exit(1);
// Fake “fall-through” since ESLint doesn’t realize this is unreacahble
}
Expand Down
1 change: 0 additions & 1 deletion web/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const server = http.createServer(async (request, response) => {
.end("403 Forbidden");

await prepareExit();
process.emitWarning("prepare-exit called");
response.writeHead(200, { "content-type": "text/plain" }).end("200 OK");

return;
Expand Down

0 comments on commit 53265a9

Please sign in to comment.