Skip to content

Commit

Permalink
update bot.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
GhomKrosmonaute committed Jun 26, 2024
1 parent 3f61441 commit 1ea9f0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/app/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import type * as pagination from "./pagination.ts"
import type * as command from "./command.ts"
import type * as logger from "./logger.ts"
import type * as slash from "./slash.ts"

import * as util from "./util.ts"
import type * as util from "./util.ts"

import { config } from "../config.ts"

Expand Down
6 changes: 2 additions & 4 deletions src/app/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import * as logger from "./logger.ts"
import * as config from "./config.ts"
import * as client from "./client.ts"

const _env = env ?? process.env

export type PermissionsNames = keyof typeof v10.PermissionFlagsBits

export async function checkUpdates() {
Expand Down Expand Up @@ -88,7 +86,7 @@ export async function checkUpdates() {
}
}

const locale = _env.BOT_LOCALE
const locale = env.BOT_LOCALE

import(`dayjs/locale/${locale ?? "en"}.js`)
.then(() => dayjs.locale(locale ?? "en"))
Expand All @@ -106,7 +104,7 @@ dayjs.extend(timezone)
dayjs.extend(toObject)
dayjs.utc(1)

if (_env.BOT_TIMEZONE) dayjs.tz.setDefault(_env.BOT_TIMEZONE)
if (env.BOT_TIMEZONE) dayjs.tz.setDefault(env.BOT_TIMEZONE)

export { dayjs }

Expand Down

0 comments on commit 1ea9f0e

Please sign in to comment.