discord-vc-stats 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scrape.ts +2 -2
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "@types/node": "^26.6.6"
13
13
  },
14
14
  "name": "discord-vc-stats",
15
- "version": "1.0.1",
15
+ "version": "1.0.2",
16
16
  "description": "Discord VC Statistics Tracker",
17
17
  "main": "scrape.ts",
18
18
  "bin": {
package/scrape.ts CHANGED
@@ -4,7 +4,7 @@ import { number, select } from '@inquirer/prompts';
4
4
  import got from 'got';
5
5
  import * as dotenv from 'dotenv';
6
6
  import sharp from 'sharp';
7
- dotenv.config();
7
+ dotenv.config({ quiet: true });
8
8
  import { styleText } from 'node:util';
9
9
 
10
10
  type Call = {
@@ -32,7 +32,7 @@ function getISOWeekNumber(date : Date) : string {
32
32
  const page = await browser.newPage();
33
33
  page.goto("https://discord.com/app")
34
34
  console.log("Please Login to Your Discord Account");
35
- if (process.env.LOGIN_EMAIL!.trim() != "" && process.env.LOGIN_PASSWORD!.trim() != ""){
35
+ if (process.env.LOGIN_EMAIL?.trim() && process.env.LOGIN_PASSWORD?.trim()){
36
36
  await page.getByRole('textbox', { name: 'Email or Phone Number' }).fill(process.env.LOGIN_EMAIL!);
37
37
  await page.getByRole('textbox', { name: 'Password' }).click();
38
38
  await page.getByRole('textbox', { name: 'Password' }).fill(process.env.LOGIN_PASSWORD!.trim());