mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 22:16:08 +00:00
* chore: disabled source map * linter
This commit is contained in:
parent
b335172d1a
commit
d1f952be27
@ -57,7 +57,7 @@ rules:
|
|||||||
'@typescript-eslint/no-misused-new': 'error'
|
'@typescript-eslint/no-misused-new': 'error'
|
||||||
'@typescript-eslint/no-namespace': 'error'
|
'@typescript-eslint/no-namespace': 'error'
|
||||||
'@typescript-eslint/no-this-alias': 'error'
|
'@typescript-eslint/no-this-alias': 'error'
|
||||||
'@typescript-eslint/no-use-before-define': 'error'
|
'@typescript-eslint/no-use-before-define': 'off'
|
||||||
'@typescript-eslint/no-var-requires': 'error'
|
'@typescript-eslint/no-var-requires': 'error'
|
||||||
'@typescript-eslint/triple-slash-reference': 'error'
|
'@typescript-eslint/triple-slash-reference': 'error'
|
||||||
'@typescript-eslint/type-annotation-spacing': 'error'
|
'@typescript-eslint/type-annotation-spacing': 'error'
|
||||||
|
@ -8,5 +8,5 @@ export default defineConfig({
|
|||||||
entry: ['src/index.ts'],
|
entry: ['src/index.ts'],
|
||||||
format: ['cjs', 'esm'],
|
format: ['cjs', 'esm'],
|
||||||
minify: isProduction,
|
minify: isProduction,
|
||||||
sourcemap: true,
|
sourcemap: false,
|
||||||
});
|
});
|
||||||
|
2
packages/cache/tsup.config.ts
vendored
2
packages/cache/tsup.config.ts
vendored
@ -8,5 +8,5 @@ export default defineConfig({
|
|||||||
entry: ['src/index.ts'],
|
entry: ['src/index.ts'],
|
||||||
format: ['cjs', 'esm'],
|
format: ['cjs', 'esm'],
|
||||||
minify: isProduction,
|
minify: isProduction,
|
||||||
sourcemap: true,
|
sourcemap: false,
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
import type { EventEmitter } from 'stream';
|
||||||
import type { Events } from './events';
|
import type { Events } from './events';
|
||||||
|
|
||||||
export interface EventAdapter extends Omit<NodeJS.EventEmitter, "emit" | "on" | "off" | "once"> {
|
export interface EventAdapter extends Omit<EventEmitter, 'emit' | 'on' | 'off' | 'once'> {
|
||||||
options?: any;
|
options?: any;
|
||||||
|
|
||||||
emit<K extends keyof Events>(
|
emit<K extends keyof Events>(
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable no-mixed-spaces-and-tabs */
|
|
||||||
import type {
|
import type {
|
||||||
DiscordAutoModerationActionExecution,
|
DiscordAutoModerationActionExecution,
|
||||||
DiscordAutoModerationRule,
|
DiscordAutoModerationRule,
|
||||||
@ -277,7 +276,7 @@ export const TYPING_START: RawHandler<DiscordTypingStart> = (
|
|||||||
session,
|
session,
|
||||||
payload.member as DiscordMemberWithUser,
|
payload.member as DiscordMemberWithUser,
|
||||||
payload.guild_id
|
payload.guild_id
|
||||||
)
|
)
|
||||||
: undefined,
|
: undefined,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -664,7 +663,7 @@ export const GUILD_SCHEDULED_EVENT_USER_REMOVE: RawHandler<
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const VOICE_STATE_UPDATE: RawHandler<DiscordVoiceState> = (session, _shardId, payload) => {
|
export const VOICE_STATE_UPDATE: RawHandler<DiscordVoiceState> = (session, _shardId, payload) => {
|
||||||
if (!payload.guild_id) return;
|
if (!payload.guild_id) { return; }
|
||||||
session.events.emit('voiceStateUpdate', payload);
|
session.events.emit('voiceStateUpdate', payload);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -828,6 +827,6 @@ export interface Events {
|
|||||||
debug: Handler<[string]>;
|
debug: Handler<[string]>;
|
||||||
voiceStateUpdate: Handler<[DiscordVoiceState]>;
|
voiceStateUpdate: Handler<[DiscordVoiceState]>;
|
||||||
voiceServerUpdate: Handler<
|
voiceServerUpdate: Handler<
|
||||||
[{ token: string, guildId: Snowflake, endpoint?: string }]
|
[{ token: string; guildId: Snowflake; endpoint?: string }]
|
||||||
>;
|
>;
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ export type Snowflake = string;
|
|||||||
export const DiscordEpoch = 14200704e5;
|
export const DiscordEpoch = 14200704e5;
|
||||||
|
|
||||||
/** utilities for Snowflakes */
|
/** utilities for Snowflakes */
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||||
export const Snowflake = {
|
export const Snowflake = {
|
||||||
snowflakeToTimestamp(id: Snowflake): number {
|
snowflakeToTimestamp(id: Snowflake): number {
|
||||||
return (Number(id) >> 22) + DiscordEpoch;
|
return (Number(id) >> 22) + DiscordEpoch;
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import { Model } from './base';
|
import type { Model } from './base';
|
||||||
import { Session } from '../biscuit';
|
import type { Session } from '../biscuit';
|
||||||
import { Snowflake } from '../snowflakes';
|
import type { Snowflake } from '../snowflakes';
|
||||||
import {
|
import type {
|
||||||
AutoModerationActionType,
|
AutoModerationActionType,
|
||||||
AutoModerationEventTypes,
|
AutoModerationEventTypes,
|
||||||
AutoModerationTriggerTypes,
|
AutoModerationTriggerTypes,
|
||||||
DiscordAutoModerationRule,
|
DiscordAutoModerationRule,
|
||||||
DiscordAutoModerationRuleTriggerMetadataPresets,
|
DiscordAutoModerationRuleTriggerMetadataPresets,
|
||||||
DiscordAutoModerationActionExecution,
|
DiscordAutoModerationActionExecution } from '@biscuitland/api-types';
|
||||||
|
import {
|
||||||
AUTO_MODERATION_RULES
|
AUTO_MODERATION_RULES
|
||||||
} from '@biscuitland/api-types';
|
} from '@biscuitland/api-types';
|
||||||
|
|
||||||
@ -27,7 +28,7 @@ export interface AutoModerationAction {
|
|||||||
metadata: ActionMetadata;
|
metadata: ActionMetadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule-json-params */
|
/** @link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule-json-params */
|
||||||
export interface CreateAutoModerationRule {
|
export interface CreateAutoModerationRule {
|
||||||
name: string;
|
name: string;
|
||||||
eventType: 1;
|
eventType: 1;
|
||||||
@ -86,10 +87,11 @@ export class AutoModerationRule implements Model {
|
|||||||
const request = await this.session.rest.get<
|
const request = await this.session.rest.get<
|
||||||
DiscordAutoModerationRule | DiscordAutoModerationRule[]
|
DiscordAutoModerationRule | DiscordAutoModerationRule[]
|
||||||
>(AUTO_MODERATION_RULES(this.guildId, ruleId));
|
>(AUTO_MODERATION_RULES(this.guildId, ruleId));
|
||||||
if (Array.isArray(request))
|
if (Array.isArray(request)) {
|
||||||
return request.map(
|
return request.map(
|
||||||
amr => new AutoModerationRule(this.session, amr)
|
amr => new AutoModerationRule(this.session, amr)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
return new AutoModerationRule(this.session, request);
|
return new AutoModerationRule(this.session, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +116,7 @@ export class AutoModerationRule implements Model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
: undefined,
|
: undefined,
|
||||||
enabled: !!options.enabled,
|
enabled: !!options.enabled,
|
||||||
exempt_roles: options.exemptRoles,
|
exempt_roles: options.exemptRoles,
|
||||||
@ -147,7 +149,7 @@ export class AutoModerationRule implements Model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
: undefined,
|
: undefined,
|
||||||
enabled: !!options.enabled,
|
enabled: !!options.enabled,
|
||||||
exempt_roles: options.exemptRoles,
|
exempt_roles: options.exemptRoles,
|
||||||
|
@ -10,36 +10,37 @@ import { urlToBase64 } from '../utils/url-to-base-64';
|
|||||||
|
|
||||||
/** Classes and routes */
|
/** Classes and routes */
|
||||||
import {
|
import {
|
||||||
DiscordChannel,
|
USER_DM,
|
||||||
DiscordInvite,
|
CHANNEL,
|
||||||
DiscordInviteMetadata,
|
CHANNEL_PINS,
|
||||||
DiscordListArchivedThreads,
|
CHANNEL_INVITES,
|
||||||
DiscordMessage,
|
CHANNEL_TYPING,
|
||||||
DiscordOverwrite,
|
CHANNEL_MESSAGES,
|
||||||
DiscordThreadMember,
|
CHANNEL_WEBHOOKS,
|
||||||
DiscordWebhook,
|
THREAD_USER,
|
||||||
TargetTypes,
|
THREAD_ME,
|
||||||
VideoQualityModes,
|
THREAD_MEMBERS,
|
||||||
GetReactions,
|
THREAD_START_PRIVATE,
|
||||||
GetMessagesOptions,
|
THREAD_ARCHIVED_PUBLIC,
|
||||||
ListArchivedThreads,
|
THREAD_ARCHIVED_PRIVATE_JOINED,
|
||||||
USER_DM} from '@biscuitland/api-types';
|
THREAD_START_PUBLIC,
|
||||||
import {
|
ChannelTypes
|
||||||
CHANNEL,
|
} from '@biscuitland/api-types';
|
||||||
CHANNEL_PINS,
|
import type {
|
||||||
CHANNEL_INVITES,
|
DiscordChannel,
|
||||||
CHANNEL_TYPING,
|
DiscordInvite,
|
||||||
CHANNEL_MESSAGES,
|
DiscordInviteMetadata,
|
||||||
CHANNEL_WEBHOOKS,
|
DiscordListArchivedThreads,
|
||||||
THREAD_USER,
|
DiscordMessage,
|
||||||
THREAD_ME,
|
DiscordOverwrite,
|
||||||
THREAD_MEMBERS,
|
DiscordThreadMember,
|
||||||
THREAD_START_PRIVATE,
|
DiscordWebhook,
|
||||||
THREAD_ARCHIVED_PUBLIC,
|
TargetTypes,
|
||||||
THREAD_ARCHIVED_PRIVATE_JOINED,
|
VideoQualityModes,
|
||||||
THREAD_START_PUBLIC,
|
GetReactions,
|
||||||
ChannelTypes,
|
GetMessagesOptions,
|
||||||
GatewayOpcodes as _GatewayOpcodes
|
ListArchivedThreads,
|
||||||
|
GatewayOpcodes as _GatewayOpcodes
|
||||||
} from '@biscuitland/api-types';
|
} from '@biscuitland/api-types';
|
||||||
|
|
||||||
import type { CreateMessage, EditMessage, EmojiResolvable } from './message';
|
import type { CreateMessage, EditMessage, EmojiResolvable } from './message';
|
||||||
@ -256,6 +257,7 @@ export class TextChannel {
|
|||||||
/**
|
/**
|
||||||
* Mixin
|
* Mixin
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||||
static applyTo(klass: Function, ignore: (keyof TextChannel)[] = []): void {
|
static applyTo(klass: Function, ignore: (keyof TextChannel)[] = []): void {
|
||||||
const methods: (keyof TextChannel)[] = [
|
const methods: (keyof TextChannel)[] = [
|
||||||
'fetchPins',
|
'fetchPins',
|
||||||
@ -322,6 +324,7 @@ export class TextChannel {
|
|||||||
* @returns The messages
|
* @returns The messages
|
||||||
*/
|
*/
|
||||||
async fetchMessages(options?: GetMessagesOptions): Promise<Message[] | []> {
|
async fetchMessages(options?: GetMessagesOptions): Promise<Message[] | []> {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
|
||||||
if (options?.limit! > 100) { throw Error('Values must be between 0-100'); }
|
if (options?.limit! > 100) { throw Error('Values must be between 0-100'); }
|
||||||
const messages = await this.session.rest.get<DiscordMessage[]>(
|
const messages = await this.session.rest.get<DiscordMessage[]>(
|
||||||
CHANNEL_MESSAGES(this.id, options),
|
CHANNEL_MESSAGES(this.id, options),
|
||||||
@ -633,7 +636,7 @@ export class GuildChannel extends BaseChannel implements Model {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { threads, members, has_more } = await this.session.rest.get<DiscordListArchivedThreads>(
|
const { threads, members, has_more: hasMore } = await this.session.rest.get<DiscordListArchivedThreads>(
|
||||||
func(this.id, options),
|
func(this.id, options),
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -644,7 +647,7 @@ export class GuildChannel extends BaseChannel implements Model {
|
|||||||
members: Object.fromEntries(
|
members: Object.fromEntries(
|
||||||
members.map(threadMember => [threadMember.id, new ThreadMember(this.session, threadMember)]),
|
members.map(threadMember => [threadMember.id, new ThreadMember(this.session, threadMember)]),
|
||||||
) as Record<Snowflake, ThreadMember>,
|
) as Record<Snowflake, ThreadMember>,
|
||||||
hasMore: has_more,
|
hasMore,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -671,7 +674,7 @@ export class GuildChannel extends BaseChannel implements Model {
|
|||||||
* @param overwrites - The overwrites to add to the channel.
|
* @param overwrites - The overwrites to add to the channel.
|
||||||
*/
|
*/
|
||||||
async setPermissions(overwrites: PermissionsOverwrites[]): Promise<Channel> {
|
async setPermissions(overwrites: PermissionsOverwrites[]): Promise<Channel> {
|
||||||
return this.edit({ permissionOverwrites: overwrites } as EditGuildChannelOptions)
|
return this.edit({ permissionOverwrites: overwrites } as EditGuildChannelOptions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -715,7 +718,7 @@ export abstract class BaseVoiceChannel extends GuildChannel {
|
|||||||
export class DMChannel extends BaseChannel implements Model {
|
export class DMChannel extends BaseChannel implements Model {
|
||||||
constructor(session: Session, data: DiscordChannel) {
|
constructor(session: Session, data: DiscordChannel) {
|
||||||
super(session, data);
|
super(session, data);
|
||||||
|
|
||||||
if (data.owner_id && data.recipents) {
|
if (data.owner_id && data.recipents) {
|
||||||
this.user = new User(session, data.recipents.find(user => user.id === data.owner_id)!);
|
this.user = new User(session, data.recipents.find(user => user.id === data.owner_id)!);
|
||||||
} else {
|
} else {
|
||||||
@ -748,13 +751,13 @@ export class DMChannel extends BaseChannel implements Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async open(userId: Snowflake): Promise<DMChannel> {
|
async open(userId: Snowflake): Promise<DMChannel> {
|
||||||
const channel = await this.session.rest.post<DiscordChannel>(USER_DM(), { recipient_id: userId});
|
const channel = await this.session.rest.post<DiscordChannel>(USER_DM(), { recipient_id: userId });
|
||||||
|
|
||||||
return new DMChannel(this.session, channel);
|
return new DMChannel(this.session, channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DMChannel extends Omit<TextChannel, 'type'>, Omit<BaseChannel, 'type'> {}
|
export interface DMChannel extends Omit<TextChannel, 'type'>, Omit<BaseChannel, 'type'> { }
|
||||||
|
|
||||||
TextChannel.applyTo(DMChannel);
|
TextChannel.applyTo(DMChannel);
|
||||||
|
|
||||||
@ -768,7 +771,7 @@ export class VoiceChannel extends BaseVoiceChannel {
|
|||||||
override type: ChannelTypes.GuildVoice;
|
override type: ChannelTypes.GuildVoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VoiceChannel extends TextChannel, BaseVoiceChannel {}
|
export interface VoiceChannel extends TextChannel, BaseVoiceChannel { }
|
||||||
|
|
||||||
TextChannel.applyTo(VoiceChannel);
|
TextChannel.applyTo(VoiceChannel);
|
||||||
|
|
||||||
@ -794,7 +797,7 @@ export class NewsChannel extends GuildChannel {
|
|||||||
|
|
||||||
TextChannel.applyTo(NewsChannel);
|
TextChannel.applyTo(NewsChannel);
|
||||||
|
|
||||||
export interface NewsChannel extends TextChannel, GuildChannel {}
|
export interface NewsChannel extends TextChannel, GuildChannel { }
|
||||||
|
|
||||||
/** StageChannel */
|
/** StageChannel */
|
||||||
export class StageChannel extends BaseVoiceChannel {
|
export class StageChannel extends BaseVoiceChannel {
|
||||||
@ -865,7 +868,7 @@ export class ThreadChannel extends GuildChannel implements Model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ThreadChannel extends Omit<GuildChannel, 'type'>, Omit<TextChannel, 'type'> {}
|
export interface ThreadChannel extends Omit<GuildChannel, 'type'>, Omit<TextChannel, 'type'> { }
|
||||||
|
|
||||||
TextChannel.applyTo(ThreadChannel);
|
TextChannel.applyTo(ThreadChannel);
|
||||||
|
|
||||||
@ -878,7 +881,7 @@ export class GuildTextChannel extends GuildChannel {
|
|||||||
override type: ChannelTypes.GuildText;
|
override type: ChannelTypes.GuildText;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GuildTextChannel extends GuildChannel, TextChannel {}
|
export interface GuildTextChannel extends GuildChannel, TextChannel { }
|
||||||
|
|
||||||
TextChannel.applyTo(GuildTextChannel);
|
TextChannel.applyTo(GuildTextChannel);
|
||||||
|
|
||||||
|
@ -158,12 +158,12 @@ export class SelectMenu extends BaseComponent implements SelectMenuComponent {
|
|||||||
this.type = data.type as MessageComponentTypes.SelectMenu;
|
this.type = data.type as MessageComponentTypes.SelectMenu;
|
||||||
this.customId = data.custom_id!;
|
this.customId = data.custom_id!;
|
||||||
this.options = data.options!.map(option => {
|
this.options = data.options!.map(option => {
|
||||||
return <SelectMenuOption>{
|
return {
|
||||||
label: option.label,
|
label: option.label,
|
||||||
description: option.description,
|
description: option.description,
|
||||||
emoji: option.emoji ? new Emoji(session, option.emoji) : undefined,
|
emoji: option.emoji ? new Emoji(session, option.emoji) : undefined,
|
||||||
value: option.value,
|
value: option.value,
|
||||||
};
|
} as SelectMenuOption;
|
||||||
});
|
});
|
||||||
this.placeholder = data.placeholder;
|
this.placeholder = data.placeholder;
|
||||||
this.minValues = data.min_values;
|
this.minValues = data.min_values;
|
||||||
|
@ -151,4 +151,5 @@ export function NewEmbedR(data: DiscordEmbed): Embed {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||||
export const embed_ = NewEmbedR;
|
export const embed_ = NewEmbedR;
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
import type { Session } from '../biscuit';
|
import type { Session } from '../biscuit';
|
||||||
import type { Model } from './base';
|
import type { Model } from './base';
|
||||||
import type { Snowflake } from '../snowflakes';
|
import type { Snowflake } from '../snowflakes';
|
||||||
import { Guild, ModifyGuildEmoji} from './guilds';
|
import type { ModifyGuildEmoji } from './guilds';
|
||||||
|
import { Guild } from './guilds';
|
||||||
import { User } from './user';
|
import { User } from './user';
|
||||||
import { EMOJI_URL, DiscordEmoji, GUILD_EMOJIS } from '@biscuitland/api-types';
|
import type { DiscordEmoji } from '@biscuitland/api-types';
|
||||||
|
import { EMOJI_URL, GUILD_EMOJIS } from '@biscuitland/api-types';
|
||||||
|
|
||||||
export class Emoji implements Partial<Model> {
|
export class Emoji implements Partial<Model> {
|
||||||
constructor(session: Session, data: DiscordEmoji) {
|
constructor(session: Session, data: DiscordEmoji) {
|
||||||
@ -65,7 +67,7 @@ export class GuildEmoji extends Emoji implements Model {
|
|||||||
async fetchAuthor(): Promise<User | null> {
|
async fetchAuthor(): Promise<User | null> {
|
||||||
const emoji = await this.session.rest.get<DiscordEmoji>(GUILD_EMOJIS(this.guildId, this.id));
|
const emoji = await this.session.rest.get<DiscordEmoji>(GUILD_EMOJIS(this.guildId, this.id));
|
||||||
|
|
||||||
if (emoji.user) return new User(this.session, emoji.user);
|
if (emoji.user) { return new User(this.session, emoji.user); }
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,6 +80,6 @@ export class GuildEmoji extends Emoji implements Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toString(): string {
|
toString(): string {
|
||||||
return `<${this.animated ? 'a' : ''}:${this.name}:${this.id}>`
|
return `<${this.animated ? 'a' : ''}:${this.name}:${this.id}>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import type { Model } from './base';
|
import type { Model } from './base';
|
||||||
import type { Session } from '../biscuit';
|
import type { Session } from '../biscuit';
|
||||||
import {
|
import type {
|
||||||
|
PremiumTiers,
|
||||||
ChannelTypes,
|
ChannelTypes,
|
||||||
DefaultMessageNotificationLevels,
|
DefaultMessageNotificationLevels,
|
||||||
DiscordBan,
|
DiscordBan,
|
||||||
@ -27,18 +28,14 @@ import {
|
|||||||
GetInvite,
|
GetInvite,
|
||||||
ListGuildMembers,
|
ListGuildMembers,
|
||||||
GetAuditLogs,
|
GetAuditLogs,
|
||||||
GUILD_AUDIT_LOGS,
|
|
||||||
DiscordAuditLog,
|
DiscordAuditLog,
|
||||||
AuditLogEvents,
|
AuditLogEvents,
|
||||||
DiscordAuditLogChange,
|
DiscordAuditLogChange } from '@biscuitland/api-types';
|
||||||
} from '@biscuitland/api-types';
|
|
||||||
import type { ImageFormat, ImageSize } from '../utils/util';
|
|
||||||
import { GuildFeatures, PremiumTiers } from '@biscuitland/api-types';
|
|
||||||
import { Snowflake } from '../snowflakes';
|
|
||||||
import { Util } from '../utils/util';
|
|
||||||
import {
|
import {
|
||||||
|
GUILD_AUDIT_LOGS,
|
||||||
INVITE,
|
INVITE,
|
||||||
GUILD_BANNER,
|
GUILD_BANNER,
|
||||||
|
GuildFeatures,
|
||||||
GUILD_ICON,
|
GUILD_ICON,
|
||||||
GUILD_SPLASH,
|
GUILD_SPLASH,
|
||||||
USER_NICK,
|
USER_NICK,
|
||||||
@ -61,9 +58,12 @@ import {
|
|||||||
GUILD_WIDGET,
|
GUILD_WIDGET,
|
||||||
USER_GUILDS,
|
USER_GUILDS,
|
||||||
CHANNEL,
|
CHANNEL,
|
||||||
GUILD_CHANNELS,
|
GUILD_CHANNELS } from '@biscuitland/api-types';
|
||||||
} from '@biscuitland/api-types';
|
import type { ImageFormat, ImageSize } from '../utils/util';
|
||||||
import { ChannelFactory, GuildChannel, ReturnThreadsArchive, ThreadChannel, ChannelInGuild } from './channels';
|
import { Snowflake } from '../snowflakes';
|
||||||
|
import { Util } from '../utils/util';
|
||||||
|
import type { ReturnThreadsArchive, ChannelInGuild } from './channels';
|
||||||
|
import { ChannelFactory, GuildChannel, ThreadChannel } from './channels';
|
||||||
import { Member, ThreadMember } from './members';
|
import { Member, ThreadMember } from './members';
|
||||||
import { Role } from './role';
|
import { Role } from './role';
|
||||||
import { GuildEmoji } from './emojis';
|
import { GuildEmoji } from './emojis';
|
||||||
@ -311,6 +311,7 @@ export class GuildPreview implements Model {
|
|||||||
this.approximatePresenceCount = data.approximate_presence_count;
|
this.approximatePresenceCount = data.approximate_presence_count;
|
||||||
this.stickers = data.stickers.map(x => new Sticker(this.session, x));
|
this.stickers = data.stickers.map(x => new Sticker(this.session, x));
|
||||||
}
|
}
|
||||||
|
|
||||||
session: Session;
|
session: Session;
|
||||||
/** guild id */
|
/** guild id */
|
||||||
id: Snowflake;
|
id: Snowflake;
|
||||||
@ -1326,7 +1327,7 @@ export class Guild extends BaseGuild implements Model {
|
|||||||
threads: auditLog.threads.map(x => ChannelFactory.fromGuildChannel(this.session, x) as ThreadChannel),
|
threads: auditLog.threads.map(x => ChannelFactory.fromGuildChannel(this.session, x) as ThreadChannel),
|
||||||
users: auditLog.users.map(x => new User(this.session, x)),
|
users: auditLog.users.map(x => new User(this.session, x)),
|
||||||
webhooks: auditLog.webhooks.map(x => new Webhook(this.session, x)),
|
webhooks: auditLog.webhooks.map(x => new Webhook(this.session, x)),
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async fetchOwner(): Promise<Member> {
|
async fetchOwner(): Promise<Member> {
|
||||||
@ -1348,6 +1349,6 @@ export class Guild extends BaseGuild implements Model {
|
|||||||
GUILD_MEMBERS(this.id, options)
|
GUILD_MEMBERS(this.id, options)
|
||||||
);
|
);
|
||||||
|
|
||||||
return members.map((member) => new Member(this.session, member, this.id));
|
return members.map(member => new Member(this.session, member, this.id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import type {
|
|||||||
DiscordMessageComponents,
|
DiscordMessageComponents,
|
||||||
DiscordMemberWithUser,
|
DiscordMemberWithUser,
|
||||||
DiscordMessageInteraction,
|
DiscordMessageInteraction,
|
||||||
|
Locales
|
||||||
} from '@biscuitland/api-types';
|
} from '@biscuitland/api-types';
|
||||||
import type { CreateMessage } from './message';
|
import type { CreateMessage } from './message';
|
||||||
import type { MessageFlags } from '../utils/util';
|
import type { MessageFlags } from '../utils/util';
|
||||||
@ -15,7 +16,11 @@ import {
|
|||||||
InteractionResponseTypes,
|
InteractionResponseTypes,
|
||||||
InteractionTypes,
|
InteractionTypes,
|
||||||
MessageComponentTypes,
|
MessageComponentTypes,
|
||||||
|
INTERACTION_ID_TOKEN,
|
||||||
|
WEBHOOK_MESSAGE,
|
||||||
|
WEBHOOK_MESSAGE_ORIGINAL
|
||||||
} from '@biscuitland/api-types';
|
} from '@biscuitland/api-types';
|
||||||
|
|
||||||
import { Role } from './role';
|
import { Role } from './role';
|
||||||
import { Attachment } from './attachment';
|
import { Attachment } from './attachment';
|
||||||
import { Snowflake } from '../snowflakes';
|
import { Snowflake } from '../snowflakes';
|
||||||
@ -25,11 +30,6 @@ import { Message } from './message';
|
|||||||
import { Permissions } from './special/permissions';
|
import { Permissions } from './special/permissions';
|
||||||
import { Webhook } from './webhook';
|
import { Webhook } from './webhook';
|
||||||
import { InteractionOptions } from './special/interaction-options';
|
import { InteractionOptions } from './special/interaction-options';
|
||||||
import {
|
|
||||||
INTERACTION_ID_TOKEN,
|
|
||||||
WEBHOOK_MESSAGE,
|
|
||||||
WEBHOOK_MESSAGE_ORIGINAL,
|
|
||||||
} from '@biscuitland/api-types';
|
|
||||||
|
|
||||||
export type InteractionResponseWith = {
|
export type InteractionResponseWith = {
|
||||||
with: InteractionApplicationCommandCallbackData;
|
with: InteractionApplicationCommandCallbackData;
|
||||||
@ -80,6 +80,8 @@ export abstract class BaseInteraction implements Model {
|
|||||||
this.applicationId = data.application_id;
|
this.applicationId = data.application_id;
|
||||||
this.version = data.version;
|
this.version = data.version;
|
||||||
|
|
||||||
|
this.locale = data.locale as Locales;
|
||||||
|
|
||||||
const perms = data.app_permissions;
|
const perms = data.app_permissions;
|
||||||
|
|
||||||
if (perms) {
|
if (perms) {
|
||||||
@ -113,7 +115,7 @@ export abstract class BaseInteraction implements Model {
|
|||||||
appPermissions?: Permissions;
|
appPermissions?: Permissions;
|
||||||
|
|
||||||
// must be implemented
|
// must be implemented
|
||||||
abstract locale?: string;
|
locale: Locales;
|
||||||
|
|
||||||
// readonly property according to docs
|
// readonly property according to docs
|
||||||
readonly version: 1;
|
readonly version: 1;
|
||||||
@ -220,7 +222,6 @@ export abstract class BaseInteraction implements Model {
|
|||||||
{
|
{
|
||||||
id: this.session.applicationId,
|
id: this.session.applicationId,
|
||||||
token: this.token,
|
token: this.token,
|
||||||
session: this.session,
|
|
||||||
},
|
},
|
||||||
messageId,
|
messageId,
|
||||||
options
|
options
|
||||||
@ -237,7 +238,6 @@ export abstract class BaseInteraction implements Model {
|
|||||||
{
|
{
|
||||||
id: this.session.applicationId,
|
id: this.session.applicationId,
|
||||||
token: this.token,
|
token: this.token,
|
||||||
session: this.session,
|
|
||||||
},
|
},
|
||||||
messageId,
|
messageId,
|
||||||
threadId
|
threadId
|
||||||
@ -251,8 +251,8 @@ export abstract class BaseInteraction implements Model {
|
|||||||
const message = await Webhook.prototype.fetchMessage.call(
|
const message = await Webhook.prototype.fetchMessage.call(
|
||||||
{
|
{
|
||||||
id: this.session.applicationId,
|
id: this.session.applicationId,
|
||||||
|
session: this.session,
|
||||||
token: this.token,
|
token: this.token,
|
||||||
session: this.session,
|
|
||||||
},
|
},
|
||||||
messageId,
|
messageId,
|
||||||
threadId
|
threadId
|
||||||
@ -339,7 +339,6 @@ export class AutoCompleteInteraction extends BaseInteraction implements Model {
|
|||||||
this.options = new InteractionOptions(
|
this.options = new InteractionOptions(
|
||||||
data.data!.options ?? []
|
data.data!.options ?? []
|
||||||
);
|
);
|
||||||
this.locale = data.locale;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override type: InteractionTypes.ApplicationCommandAutocomplete;
|
override type: InteractionTypes.ApplicationCommandAutocomplete;
|
||||||
@ -348,7 +347,6 @@ export class AutoCompleteInteraction extends BaseInteraction implements Model {
|
|||||||
commandType: ApplicationCommandTypes;
|
commandType: ApplicationCommandTypes;
|
||||||
commandGuildId?: Snowflake;
|
commandGuildId?: Snowflake;
|
||||||
options: InteractionOptions;
|
options: InteractionOptions;
|
||||||
override locale?: string;
|
|
||||||
|
|
||||||
async respondWithChoices(
|
async respondWithChoices(
|
||||||
choices: ApplicationCommandOptionChoice[]
|
choices: ApplicationCommandOptionChoice[]
|
||||||
@ -434,8 +432,6 @@ export class CommandInteraction extends BaseInteraction implements Model {
|
|||||||
this.resolved.messages.set(id, new Message(session, m));
|
this.resolved.messages.set(id, new Message(session, m));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.locale = data.locale;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override type: InteractionTypes.ApplicationCommand;
|
override type: InteractionTypes.ApplicationCommand;
|
||||||
@ -445,7 +441,6 @@ export class CommandInteraction extends BaseInteraction implements Model {
|
|||||||
commandGuildId?: Snowflake;
|
commandGuildId?: Snowflake;
|
||||||
resolved: CommandInteractionDataResolved;
|
resolved: CommandInteractionDataResolved;
|
||||||
options: InteractionOptions;
|
options: InteractionOptions;
|
||||||
override locale?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ModalInMessage = ModalSubmitInteraction & {
|
export type ModalInMessage = ModalSubmitInteraction & {
|
||||||
@ -468,8 +463,6 @@ export class ModalSubmitInteraction extends BaseInteraction implements Model {
|
|||||||
if (data.message) {
|
if (data.message) {
|
||||||
this.message = new Message(session, data.message);
|
this.message = new Message(session, data.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.locale = data.locale;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override type: InteractionTypes.MessageComponent;
|
override type: InteractionTypes.MessageComponent;
|
||||||
@ -479,7 +472,6 @@ export class ModalSubmitInteraction extends BaseInteraction implements Model {
|
|||||||
values?: string[];
|
values?: string[];
|
||||||
message?: Message;
|
message?: Message;
|
||||||
components;
|
components;
|
||||||
override locale?: string;
|
|
||||||
|
|
||||||
static transformComponent(component: DiscordMessageComponents[number]) {
|
static transformComponent(component: DiscordMessageComponents[number]) {
|
||||||
return {
|
return {
|
||||||
@ -535,7 +527,6 @@ export class ComponentInteraction extends BaseInteraction implements Model {
|
|||||||
this.targetId = data.data!.target_id;
|
this.targetId = data.data!.target_id;
|
||||||
this.values = data.data!.values;
|
this.values = data.data!.values;
|
||||||
this.message = new Message(session, data.message!);
|
this.message = new Message(session, data.message!);
|
||||||
this.locale = data.locale;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override type: InteractionTypes.MessageComponent;
|
override type: InteractionTypes.MessageComponent;
|
||||||
@ -544,7 +535,6 @@ export class ComponentInteraction extends BaseInteraction implements Model {
|
|||||||
targetId?: Snowflake;
|
targetId?: Snowflake;
|
||||||
values?: string[];
|
values?: string[];
|
||||||
message: Message;
|
message: Message;
|
||||||
override locale?: string;
|
|
||||||
|
|
||||||
isButton(): boolean {
|
isButton(): boolean {
|
||||||
return this.componentType === MessageComponentTypes.Button;
|
return this.componentType === MessageComponentTypes.Button;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable no-mixed-spaces-and-tabs */
|
|
||||||
import type { Session } from '../biscuit';
|
import type { Session } from '../biscuit';
|
||||||
import type { Snowflake } from '../snowflakes';
|
import type { Snowflake } from '../snowflakes';
|
||||||
import type {
|
import type {
|
||||||
@ -121,7 +120,7 @@ export class Invite {
|
|||||||
? new Application(
|
? new Application(
|
||||||
session,
|
session,
|
||||||
data.target_application as DiscordApplication
|
data.target_application as DiscordApplication
|
||||||
)
|
)
|
||||||
: undefined;
|
: undefined;
|
||||||
this.targetType = data.target_type;
|
this.targetType = data.target_type;
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ export class Member implements Model {
|
|||||||
} else {
|
} else {
|
||||||
url = USER_AVATAR(
|
url = USER_AVATAR(
|
||||||
this.user.id,
|
this.user.id,
|
||||||
this.avatarHash
|
this.avatarHash
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable no-mixed-spaces-and-tabs */
|
|
||||||
import type { Session } from '../biscuit';
|
import type { Session } from '../biscuit';
|
||||||
import type {
|
import type {
|
||||||
DiscordMemberWithUser,
|
DiscordMemberWithUser,
|
||||||
@ -71,7 +70,7 @@ export function NewMessageReactionAdd(
|
|||||||
session,
|
session,
|
||||||
data.member as DiscordMemberWithUser,
|
data.member as DiscordMemberWithUser,
|
||||||
data.guild_id ?? ''
|
data.guild_id ?? ''
|
||||||
)
|
)
|
||||||
: undefined,
|
: undefined,
|
||||||
emoji: new Emoji(session, data.emoji),
|
emoji: new Emoji(session, data.emoji),
|
||||||
};
|
};
|
||||||
|
@ -15,7 +15,8 @@ import type { Channel } from './channels';
|
|||||||
import type { Component } from './components';
|
import type { Component } from './components';
|
||||||
import type { MessageInteraction } from './interactions';
|
import type { MessageInteraction } from './interactions';
|
||||||
import type { StickerItem } from './sticker';
|
import type { StickerItem } from './sticker';
|
||||||
import { Embed, NewEmbed } from './embed';
|
import type { Embed } from './embed';
|
||||||
|
import { NewEmbed } from './embed';
|
||||||
import { MessageFlags } from '../utils/util';
|
import { MessageFlags } from '../utils/util';
|
||||||
import { Snowflake } from '../snowflakes';
|
import { Snowflake } from '../snowflakes';
|
||||||
import { ChannelFactory, ThreadChannel } from './channels';
|
import { ChannelFactory, ThreadChannel } from './channels';
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable no-mixed-spaces-and-tabs */
|
|
||||||
import type {
|
import type {
|
||||||
ActivityTypes,
|
ActivityTypes,
|
||||||
DiscordActivityButton,
|
DiscordActivityButton,
|
||||||
@ -74,7 +73,7 @@ export class Presence {
|
|||||||
largeText: activity.assets.large_text,
|
largeText: activity.assets.large_text,
|
||||||
smallImage: activity.assets.small_image,
|
smallImage: activity.assets.small_image,
|
||||||
smallText: activity.assets.small_text,
|
smallText: activity.assets.small_text,
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
secrets: activity.secrets ? activity.secrets : undefined,
|
secrets: activity.secrets ? activity.secrets : undefined,
|
||||||
instance: !!activity.instance,
|
instance: !!activity.instance,
|
||||||
|
@ -233,8 +233,8 @@ export class InteractionOptions {
|
|||||||
|
|
||||||
/** searches for the focused option */
|
/** searches for the focused option */
|
||||||
getFocused(full: true): DiscordInteractionDataOption;
|
getFocused(full: true): DiscordInteractionDataOption;
|
||||||
getFocused(full: false): DiscordInteractionDataOption["value"];
|
getFocused(full: false): DiscordInteractionDataOption['value'];
|
||||||
getFocused(full: boolean = false) {
|
getFocused(full = false) {
|
||||||
const focusedOption: DiscordInteractionDataOption | void =
|
const focusedOption: DiscordInteractionDataOption | void =
|
||||||
this.hoistedOptions.find(option => option.focused);
|
this.hoistedOptions.find(option => option.focused);
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ export class Permissions implements BitField<bigint> {
|
|||||||
bitfield: bigint;
|
bitfield: bigint;
|
||||||
|
|
||||||
/** Wheter to grant all other permissions to the administrator */
|
/** Wheter to grant all other permissions to the administrator */
|
||||||
__admin__: boolean = true;
|
__admin__ = true;
|
||||||
|
|
||||||
constructor(bitfield: PermissionResolvable) {
|
constructor(bitfield: PermissionResolvable) {
|
||||||
this.bitfield = Permissions.resolve(bitfield);
|
this.bitfield = Permissions.resolve(bitfield);
|
||||||
@ -39,7 +39,7 @@ export class Permissions implements BitField<bigint> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
add(...bits: PermissionResolvable[]): this {
|
add(...bits: PermissionResolvable[]): this {
|
||||||
let reduced: bigint = 0n;
|
let reduced = 0n;
|
||||||
for (const bit of bits) {
|
for (const bit of bits) {
|
||||||
reduced |= Permissions.resolve(bit);
|
reduced |= Permissions.resolve(bit);
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ export class Permissions implements BitField<bigint> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
remove(...bits: PermissionResolvable[]): this {
|
remove(...bits: PermissionResolvable[]): this {
|
||||||
let reduced: bigint = 0n;
|
let reduced = 0n;
|
||||||
for (const bit of bits) {
|
for (const bit of bits) {
|
||||||
reduced |= Permissions.resolve(bit);
|
reduced |= Permissions.resolve(bit);
|
||||||
}
|
}
|
||||||
@ -121,7 +121,7 @@ export class Permissions implements BitField<bigint> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toJSON(): { fields: string[] } {
|
toJSON(): { fields: string[] } {
|
||||||
const fields = Object.keys(Permissions.Flags).filter((bit) => typeof bit === 'number' && this.has(bit));
|
const fields = Object.keys(Permissions.Flags).filter(bit => typeof bit === 'number' && this.has(bit));
|
||||||
|
|
||||||
return { fields };
|
return { fields };
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
export function calculateShardId(totalShards: number, guildId: bigint) {
|
export function calculateShardId(totalShards: number, guildId: bigint) {
|
||||||
if (totalShards === 1) return 0;
|
if (totalShards === 1) { return 0; }
|
||||||
|
|
||||||
return Number((guildId >> 22n) % BigInt(totalShards - 1));
|
return Number((guildId >> 22n) % BigInt(totalShards - 1));
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** Converts a url to base 64. Useful for example, uploading/creating server emojis. */
|
/** Converts a url to base 64. Useful for example, uploading/creating server emojis. */
|
||||||
export async function urlToBase64(url: string): Promise<string> {
|
export async function urlToBase64(url: string): Promise<string> {
|
||||||
const buffer = await fetch(url).then((res) => res.arrayBuffer());
|
const buffer = await fetch(url).then(res => res.arrayBuffer());
|
||||||
const imageStr = encode(buffer);
|
const imageStr = encode(buffer);
|
||||||
const type = url.substring(url.lastIndexOf('.') + 1);
|
const type = url.substring(url.lastIndexOf('.') + 1);
|
||||||
return `data:image/${type};base64,${imageStr}`;
|
return `data:image/${type};base64,${imageStr}`;
|
||||||
|
@ -2,13 +2,6 @@ import type { SelectMenuBuilder, InputTextBuilder, ButtonBuilder } from '@biscui
|
|||||||
import type { Permissions } from '../structures/special/permissions';
|
import type { Permissions } from '../structures/special/permissions';
|
||||||
import type { Snowflake } from '../snowflakes';
|
import type { Snowflake } from '../snowflakes';
|
||||||
|
|
||||||
/*
|
|
||||||
* Represents a session's cache
|
|
||||||
* */
|
|
||||||
export interface SymCache {
|
|
||||||
readonly cache: symbol;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @link https://discord.com/developers/docs/resources/channel#message-object-message-flags
|
* @link https://discord.com/developers/docs/resources/channel#message-object-message-flags
|
||||||
*/
|
*/
|
||||||
@ -88,10 +81,10 @@ export abstract class Util {
|
|||||||
/** Removes the Bot before the token. */
|
/** Removes the Bot before the token. */
|
||||||
static removeTokenPrefix(token?: string, type: 'GATEWAY' | 'REST' = 'REST'): string {
|
static removeTokenPrefix(token?: string, type: 'GATEWAY' | 'REST' = 'REST'): string {
|
||||||
// If no token is provided, throw an error
|
// If no token is provided, throw an error
|
||||||
if (!token) throw new Error(`The ${type} was not given a token. Please provide a token and try again.`);
|
if (!token) { throw new Error(`The ${type} was not given a token. Please provide a token and try again.`); }
|
||||||
|
|
||||||
// If the token does not have a prefix just return token
|
// If the token does not have a prefix just return token
|
||||||
if (!token.startsWith('Bot ')) return token;
|
if (!token.startsWith('Bot ')) { return token; }
|
||||||
|
|
||||||
// Remove the prefix and return only the token.
|
// Remove the prefix and return only the token.
|
||||||
return token.substring(token.indexOf(' ') + 1);
|
return token.substring(token.indexOf(' ') + 1);
|
||||||
|
@ -8,5 +8,5 @@ export default defineConfig({
|
|||||||
entry: ['src/index.ts'],
|
entry: ['src/index.ts'],
|
||||||
format: ['cjs', 'esm'],
|
format: ['cjs', 'esm'],
|
||||||
minify: isProduction,
|
minify: isProduction,
|
||||||
sourcemap: true,
|
sourcemap: false,
|
||||||
});
|
});
|
||||||
|
@ -8,5 +8,5 @@ export default defineConfig({
|
|||||||
entry: ['src/index.ts'],
|
entry: ['src/index.ts'],
|
||||||
format: ['cjs', 'esm'],
|
format: ['cjs', 'esm'],
|
||||||
minify: isProduction,
|
minify: isProduction,
|
||||||
sourcemap: true,
|
sourcemap: false,
|
||||||
});
|
});
|
||||||
|
@ -8,5 +8,5 @@ export default defineConfig({
|
|||||||
entry: ['src/index.ts'],
|
entry: ['src/index.ts'],
|
||||||
format: ['cjs', 'esm'],
|
format: ['cjs', 'esm'],
|
||||||
minify: isProduction,
|
minify: isProduction,
|
||||||
sourcemap: true,
|
sourcemap: false,
|
||||||
});
|
});
|
||||||
|
@ -8,5 +8,5 @@ export default defineConfig({
|
|||||||
entry: ['src/index.ts'],
|
entry: ['src/index.ts'],
|
||||||
format: ['cjs', 'esm'],
|
format: ['cjs', 'esm'],
|
||||||
minify: isProduction,
|
minify: isProduction,
|
||||||
sourcemap: true,
|
sourcemap: false,
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user