Skip to content

Commit

Permalink
phew
Browse files Browse the repository at this point in the history
  • Loading branch information
akpi816218 committed Sep 14, 2024
1 parent f4e11a5 commit f16b876
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
11 changes: 11 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"devDependencies": {
"@octokit/types": "^13.5.0",
"@types/cors": "^2.8.17",
"@types/dotenv": "^6.1.1",
"@types/express": "^4.17.21",
"@types/node-schedule": "^2.1.7",
"@types/qrcode": "^1.5.5",
Expand Down
4 changes: 1 addition & 3 deletions src/commands/bday.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ export const help = new CommandHelpEntry(
);

export const execute = async (interaction: ChatInputCommandInteraction) => {
const db = await openKv(DENO_KV_URL, {
accessToken: process.env.DENO_KV_ACCESS_TOKEN!
});
const db = await openKv(DENO_KV_URL);
switch (interaction.options.getSubcommand()) {
case 'register': {
await interaction.deferReply({
Expand Down
4 changes: 1 addition & 3 deletions src/commands/conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ export const help = new CommandHelpEntry(
]
);

const db = await openKv(DENO_KV_URL, {
accessToken: process.env.DENO_KV_ACCESS_TOKEN!
});
const db = await openKv(DENO_KV_URL);
const handlers = {
auditlog: async (
interaction: ChatInputCommandInteraction,
Expand Down
5 changes: 1 addition & 4 deletions src/events/a.getGuildConf.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import 'dotenv/config';
import { openKv } from '@deno/kv';
import { BaseGuildConfig } from '../struct/database';
import { Guild } from 'discord.js';
import { DENO_KV_URL, DatabaseKeys } from '../config';

const db = await openKv(DENO_KV_URL, {
accessToken: process.env.DENO_KV_ACCESS_TOKEN!
});
const db = await openKv(DENO_KV_URL);

export async function getGuildAuditLoggingChannel(guild: Guild) {
const config = await getGuildConfig(guild);
Expand Down
4 changes: 1 addition & 3 deletions src/interactionHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ import { logger } from './logger';
import { openKv } from '@deno/kv';
import { DENO_KV_URL, DatabaseKeys } from './config';

const db = await openKv(DENO_KV_URL, {
accessToken: process.env.DENO_KV_ACCESS_TOKEN!
});
const db = await openKv(DENO_KV_URL);

export const InteractionHandlers = {
async Button(interaction: ButtonInteraction): Promise<void> {
Expand Down

0 comments on commit f16b876

Please sign in to comment.