Skip to content

Commit

Permalink
patch up
Browse files Browse the repository at this point in the history
  • Loading branch information
akpi816218 committed Apr 2, 2024
1 parent 97cd857 commit 8eca7c5
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 53 deletions.
95 changes: 48 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"@types/express": "^4.17.21",
"@types/node-schedule": "^2.1.6",
"@types/qrcode": "^1.5.5",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"eslint": "^8.57.0",
"husky": "^9.0.11",
"knip": "^5.7.0",
Expand Down
8 changes: 4 additions & 4 deletions src/commands/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import {
TextInputStyle,
userMention
} from 'discord.js';
import TypedJsoning from 'typed-jsoning';
import Jsoning from 'jsoning';

const db = new TypedJsoning<Snowflake[]>('botfiles/dev.db.json');
const db = new Jsoning('botfiles/dev.db.json');

export const data = new SlashCommandBuilder()
.setName('dev')
Expand Down Expand Up @@ -87,8 +87,8 @@ export const data = new SlashCommandBuilder()
.setDMPermission(true);

export const execute = async (interaction: ChatInputCommandInteraction) => {
const whitelist = db.get('whitelist') || [];
const blacklist = db.get('blacklist') || [];
const whitelist = ((await db.get('whitelist')) as string[]) || [];
const blacklist = ((await db.get('blacklist')) as string[]) || [];
if (!whitelist.includes(interaction.user.id)) {
await interaction.reply('Restricted Commmand');
return;
Expand Down

0 comments on commit 8eca7c5

Please sign in to comment.