mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
fix: permissions and magicImport (#285)
* fix: magicImport * fix: dapi-types * fix: socram
This commit is contained in:
parent
4052cb2a53
commit
e7b8806973
@ -279,11 +279,12 @@ export const ReplaceRegex = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export async function magicImport(path: string) {
|
export async function magicImport(path: string) {
|
||||||
try {
|
//@ts-expect-error
|
||||||
return require(path);
|
if (typeof require === 'undefined' || globalThis.Deno)
|
||||||
} catch {
|
return new Function('return ((path) => import(`file:///${path}?update=${Date.now()}`))')()(
|
||||||
return eval('((path) => import(`file:///${path}?update=${Date.now()}`))')(path.split('\\').join('\\\\'));
|
path.split('\\').join('\\\\'),
|
||||||
}
|
);
|
||||||
|
return require(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OnFailCallback = (error: unknown) => any;
|
export type OnFailCallback = (error: unknown) => any;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { ApplicationIntegrationType, InteractionContextType } from '..';
|
import type { ApplicationIntegrationType, InteractionContextType } from '..';
|
||||||
import type { ChannelType, Snowflake } from '../..';
|
import type { ChannelType, Permissions, Snowflake } from '../..';
|
||||||
|
|
||||||
import type { LocaleString } from '../../rest';
|
import type { LocaleString } from '../../rest';
|
||||||
import type {
|
import type {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import type { LocalizationMap } from '.';
|
import type { LocalizationMap } from '.';
|
||||||
import type { Snowflake } from '..';
|
import type { Permissions, Snowflake } from '..';
|
||||||
import type { APIPartialGuild } from './guild';
|
import type { APIPartialGuild } from './guild';
|
||||||
import type { ApplicationIntegrationType } from './interactions';
|
import type { ApplicationIntegrationType } from './interactions';
|
||||||
import type { OAuth2Scopes } from './oauth2';
|
import type { OAuth2Scopes } from './oauth2';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Snowflake } from '..';
|
import type { Permissions, Snowflake } from '..';
|
||||||
import type {
|
import type {
|
||||||
APIBan,
|
APIBan,
|
||||||
APIChannel,
|
APIChannel,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Snowflake } from '..';
|
import type { Permissions, Snowflake } from '..';
|
||||||
import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from '../payloads';
|
import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from '../payloads';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Snowflake } from '..';
|
import type { Permissions, Snowflake } from '..';
|
||||||
import type {
|
import type {
|
||||||
APIApplicationRoleConnection,
|
APIApplicationRoleConnection,
|
||||||
APIChannel,
|
APIChannel,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user