Skip to content
Merged
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
10 changes: 5 additions & 5 deletions src/commands/general/calreminder.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DB } from "@root/config";

Check failure on line 1 in src/commands/general/calreminder.ts

View workflow job for this annotation

GitHub Actions / node / build

Strings must use singlequote
import { Command } from "@root/src/lib/types/Command";

Check failure on line 2 in src/commands/general/calreminder.ts

View workflow job for this annotation

GitHub Actions / node / build

Strings must use singlequote
import { Reminder } from "@root/src/lib/types/Reminder";

Check failure on line 3 in src/commands/general/calreminder.ts

View workflow job for this annotation

GitHub Actions / node / build

Strings must use singlequote
import {
Expand All @@ -8,13 +8,13 @@
ButtonBuilder,
ButtonStyle,
ChatInputCommandInteraction,
ComponentType,

Check failure on line 11 in src/commands/general/calreminder.ts

View workflow job for this annotation

GitHub Actions / node / build

Unexpected trailing comma
} from "discord.js";

Check failure on line 12 in src/commands/general/calreminder.ts

View workflow job for this annotation

GitHub Actions / node / build

Strings must use singlequote
import parse from "parse-duration";

Check failure on line 13 in src/commands/general/calreminder.ts

View workflow job for this annotation

GitHub Actions / node / build

Strings must use singlequote
import { PagifiedSelectMenu } from "@root/src/lib/utils/calendarUtils";
import { retrieveEvents } from "@root/src/lib/auth";

Check failure on line 14 in src/commands/general/calreminder.ts

View workflow job for this annotation

GitHub Actions / node / build

Strings must use singlequote
import { calendar_v3 } from "googleapis";
import { calendar_v3 as calendarV3 } from "googleapis";

Check failure on line 15 in src/commands/general/calreminder.ts

View workflow job for this annotation

GitHub Actions / node / build

Strings must use singlequote
import { MongoClient } from "mongodb";

Check failure on line 16 in src/commands/general/calreminder.ts

View workflow job for this annotation

GitHub Actions / node / build

Strings must use singlequote
import { PagifiedSelectMenu } from "@root/src/lib/types/PagifiedSelect";

Check failure on line 17 in src/commands/general/calreminder.ts

View workflow job for this annotation

GitHub Actions / node / build

Strings must use singlequote
const MONGO_URI = process.env.DB_CONN_STRING || "";

export default class extends Command {
Expand All @@ -35,7 +35,7 @@

function generateMessage(
repeatInterval: "every_event" | null,
chosenEvent?: calendar_v3.Schema$Event,
chosenEvent?: calendarV3.Schema$Event,
chosenOffset?: number,
renderMenus = false,
eventCurrentPage = 0,
Expand Down Expand Up @@ -206,7 +206,7 @@

const filteredEvents = events; // no filtering needed since each calendar is specific to a course

let chosenEvent: calendar_v3.Schema$Event = null;
let chosenEvent: calendarV3.Schema$Event = null;
let chosenOffset: number = null;
let repeatInterval: "every_event" = null;
let activeReminderId: string = null;
Expand Down Expand Up @@ -234,7 +234,7 @@

collector.on("collect", async (i) => {
if (i.customId === "select_event") {
const [eventDateStr, indexStr] = i.values[0].split("::");
const [, indexStr] = i.values[0].split("::");
const selectedIndex = parseInt(indexStr);
chosenEvent = filteredEvents[selectedIndex];
await i.deferUpdate();
Expand Down