Skip to content

Commit

Permalink
update deps + stricter ts
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhdev committed Nov 30, 2024
1 parent 3f3ea12 commit 610c8cc
Show file tree
Hide file tree
Showing 8 changed files with 1,100 additions and 460 deletions.
1,517 changes: 1,078 additions & 439 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reminders",
"version": "1.4.0",
"version": "1.5.0",
"description": "Set reminders for things you need to do.",
"main": "dist/index.js",
"scripts": {
Expand All @@ -18,14 +18,14 @@
},
"homepage": "https://github.com/wdhdev/reminders#readme",
"dependencies": {
"@sentry/node": "^8.25.0",
"discord.js": "^14.15.3",
"@sentry/node": "^8.41.0",
"discord.js": "^14.16.3",
"dotenv": "^16.4.5",
"mongoose": "^8.5.2"
"mongoose": "^8.8.3"
},
"devDependencies": {
"@sentry/types": "^8.25.0",
"@types/node": "^22.2.0",
"typescript": "^5.5.4"
"@sentry/types": "^8.41.0",
"@types/node": "^22.10.1",
"typescript": "^5.7.2"
}
}
1 change: 0 additions & 1 deletion src/events/client/ready.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Event from "../../classes/Event";
import ExtendedClient from "../../classes/ExtendedClient";

import Discord from "discord.js";
import { exec } from "child_process";
import globalCommands from "../../scripts/global-commands";
import setReminder from "../../util/setReminder";

Expand Down
4 changes: 2 additions & 2 deletions src/events/guild/interactionCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const event: Event = {
const requiredPerms: PermissionResolvable = ["SendMessages", "EmbedLinks"];

// Ignore interactions not in a guild
if(!interaction.guild || !interaction.guild.id) return;
if(!interaction.guild || !interaction.guild?.id) return;
// Ignore interactions if the bot does not have the required permissions
if(!interaction.guild.members.me.permissions.has(requiredPerms)) return;
if(!interaction.guild?.members.me.permissions.has(requiredPerms)) return;

// Autocomplete handler
if(interaction.isAutocomplete()) return await autocompleteHandler(client, interaction);
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ client.config = config;
process.on("unhandledRejection", (err: Error) => Sentry.captureException(err));

// Connect to Database
import database from "./util/database";
import database from "./lib/mongo";
database();

// Handlers
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/util/interaction/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export = async (client: ExtendedClient, Discord: typeof import("discord.js"), in
for(const perm of command.botPermissions as any) {
if(!validPermissions.includes(perm)) return;

if(!interaction.guild.members.me.permissions.has(perm)) invalidPerms.push(perm);
if(!interaction.guild?.members.me.permissions.has(perm)) invalidPerms.push(perm);
}

if(invalidPerms.length) {
Expand Down
20 changes: 11 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "CommonJS",
"lib": ["ES2020"],
"allowJs": true,
"outDir": "./dist",
"rootDir": "./src",
"esModuleInterop": true,
"lib": ["ES6"],
"module": "CommonJS",
"noImplicitAny": true,
"outDir": "dist",
"resolveJsonModule": true,
"rootDir": "src",
"typeRoots": ["./typings"],
"skipLibCheck": true,
"strict": false,
"target": "ES2020",
"typeRoots": ["typings/"]
"noImplicitAny": true,
"forceConsistentCasingInFileNames": true,
"noUnusedLocals": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src/", "typings/"]
"include": ["src", "typings"]
}

0 comments on commit 610c8cc

Please sign in to comment.