diff --git a/lib/routes/discord/search.ts b/lib/routes/discord/search.ts index 633539f7d0a390..5e36f35d865bf2 100644 --- a/lib/routes/discord/search.ts +++ b/lib/routes/discord/search.ts @@ -3,6 +3,7 @@ import path from 'node:path'; import { config } from '@/config'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import { Route } from '@/types'; +import { getCurrentPath } from '@/utils/helpers'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import ConfigNotFoundError from '@/errors/types/config-not-found'; @@ -10,6 +11,8 @@ import { queryToBoolean } from '@/utils/readable-social'; import { baseUrl, getGuild, searchGuildMessages, SearchGuildMessagesParams, HasType, VALID_HAS_TYPES } from './discord-api'; +const __dirname = getCurrentPath(import.meta.url); + export const route: Route = { path: '/search/:guildId/:routeParams', categories: ['social-media'],