mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
fix: fixed react/astro/guide/discord.js build, updated dependencies, fix crawlvatar (#8861)
This commit is contained in:
@@ -43,6 +43,8 @@ const createSROnlyLabel = (text: string) => {
|
|||||||
return node;
|
return node;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const rootDir = new URL('../../', import.meta.url);
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
integrations: [
|
integrations: [
|
||||||
react(),
|
react(),
|
||||||
@@ -54,7 +56,7 @@ export default defineConfig({
|
|||||||
throttle: 3,
|
throttle: 3,
|
||||||
}),
|
}),
|
||||||
Unocss({
|
Unocss({
|
||||||
configFile: fileURLToPath(new URL('../../unocss.config.ts', import.meta.url)),
|
configFile: fileURLToPath(new URL('unocss.config.ts', rootDir)),
|
||||||
}),
|
}),
|
||||||
critters(),
|
critters(),
|
||||||
compress(),
|
compress(),
|
||||||
@@ -95,19 +97,19 @@ export default defineConfig({
|
|||||||
vite: {
|
vite: {
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'ariakit/button': fileURLToPath(new URL('node_modules/ariakit/esm/button/index.js', import.meta.url)),
|
'ariakit/button': fileURLToPath(new URL('node_modules/ariakit/esm/button/index.js', rootDir)),
|
||||||
'ariakit/disclosure': fileURLToPath(new URL('node_modules/ariakit/esm/disclosure/index.js', import.meta.url)),
|
'ariakit/disclosure': fileURLToPath(new URL('node_modules/ariakit/esm/disclosure/index.js', rootDir)),
|
||||||
'ariakit/separator': fileURLToPath(new URL('node_modules/ariakit/esm/separator/index.js', import.meta.url)),
|
'ariakit/separator': fileURLToPath(new URL('node_modules/ariakit/esm/separator/index.js', rootDir)),
|
||||||
'ariakit-utils/dom': fileURLToPath(new URL('node_modules/ariakit-utils/esm/dom.js', import.meta.url)),
|
'ariakit-utils/dom': fileURLToPath(new URL('node_modules/ariakit-utils/esm/dom.js', rootDir)),
|
||||||
'ariakit-utils/events': fileURLToPath(new URL('node_modules/ariakit-utils/esm/events.js', import.meta.url)),
|
'ariakit-utils/events': fileURLToPath(new URL('node_modules/ariakit-utils/esm/events.js', rootDir)),
|
||||||
'ariakit-utils/focus': fileURLToPath(new URL('node_modules/ariakit-utils/esm/focus.js', import.meta.url)),
|
'ariakit-utils/focus': fileURLToPath(new URL('node_modules/ariakit-utils/esm/focus.js', rootDir)),
|
||||||
'ariakit-utils/hooks': fileURLToPath(new URL('node_modules/ariakit-utils/esm/hooks.js', import.meta.url)),
|
'ariakit-utils/hooks': fileURLToPath(new URL('node_modules/ariakit-utils/esm/hooks.js', rootDir)),
|
||||||
'ariakit-utils/misc': fileURLToPath(new URL('node_modules/ariakit-utils/esm/misc.js', import.meta.url)),
|
'ariakit-utils/misc': fileURLToPath(new URL('node_modules/ariakit-utils/esm/misc.js', rootDir)),
|
||||||
'ariakit-utils/platform': fileURLToPath(new URL('node_modules/ariakit-utils/esm/platform.js', import.meta.url)),
|
'ariakit-utils/platform': fileURLToPath(new URL('node_modules/ariakit-utils/esm/platform.js', rootDir)),
|
||||||
'ariakit-utils/system': fileURLToPath(new URL('node_modules/ariakit-utils/esm/system.js', import.meta.url)),
|
'ariakit-utils/system': fileURLToPath(new URL('node_modules/ariakit-utils/esm/system.js', rootDir)),
|
||||||
'react-icons/fi': fileURLToPath(new URL('node_modules/react-icons/fi/index.esm.js', import.meta.url)),
|
'react-icons/fi': fileURLToPath(new URL('node_modules/react-icons/fi/index.esm.js', rootDir)),
|
||||||
'react-icons/vsc': fileURLToPath(new URL('node_modules/react-icons/vsc/index.esm.js', import.meta.url)),
|
'react-icons/vsc': fileURLToPath(new URL('node_modules/react-icons/vsc/index.esm.js', rootDir)),
|
||||||
'react-use': fileURLToPath(new URL('node_modules/react-use/esm/index.js', import.meta.url)),
|
'react-use': fileURLToPath(new URL('node_modules/react-use/esm/index.js', rootDir)),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -35,16 +35,16 @@
|
|||||||
"homepage": "https://discord.js.org",
|
"homepage": "https://discord.js.org",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/image": "^0.11.6",
|
"@astrojs/image": "^0.11.6",
|
||||||
"@astrojs/mdx": "^0.11.6",
|
"@astrojs/mdx": "^0.12.0",
|
||||||
"@astrojs/react": "^1.2.2",
|
"@astrojs/react": "^1.2.2",
|
||||||
"@code-hike/mdx": "^0.7.4",
|
"@code-hike/mdx": "^0.7.4",
|
||||||
"@discordjs/ui": "workspace:^",
|
"@discordjs/ui": "workspace:^",
|
||||||
"ariakit": "^2.0.0-next.41",
|
"ariakit": "^2.0.0-next.41",
|
||||||
"cmdk": "^0.1.20",
|
"cmdk": "^0.1.20",
|
||||||
"meilisearch": "^0.29.1",
|
"meilisearch": "^0.29.1",
|
||||||
"react": "^17.0.2",
|
"react": "^18.2.0",
|
||||||
"react-custom-scrollbars-2": "^4.5.0",
|
"react-custom-scrollbars-2": "^4.5.0",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^18.2.0",
|
||||||
"react-icons": "^4.6.0",
|
"react-icons": "^4.6.0",
|
||||||
"react-use": "^17.4.0",
|
"react-use": "^17.4.0",
|
||||||
"sharp": "^0.31.2",
|
"sharp": "^0.31.2",
|
||||||
@@ -55,16 +55,16 @@
|
|||||||
"@testing-library/react": "^13.4.0",
|
"@testing-library/react": "^13.4.0",
|
||||||
"@testing-library/user-event": "^14.4.3",
|
"@testing-library/user-event": "^14.4.3",
|
||||||
"@types/node": "16.18.3",
|
"@types/node": "16.18.3",
|
||||||
"@types/react": "^17.0.52",
|
"@types/react": "^18.0.25",
|
||||||
"@types/react-dom": "^17.0.18",
|
"@types/react-dom": "^18.0.9",
|
||||||
"@types/react-syntax-highlighter": "^15.5.5",
|
"@types/react-syntax-highlighter": "^15.5.5",
|
||||||
"@unocss/cli": "^0.46.5",
|
"@unocss/cli": "^0.46.5",
|
||||||
"@unocss/reset": "^0.46.5",
|
"@unocss/reset": "^0.46.5",
|
||||||
"@vitejs/plugin-react": "^2.2.0",
|
"@vitejs/plugin-react": "^2.2.0",
|
||||||
"@vitest/coverage-c8": "^0.25.3",
|
"@vitest/coverage-c8": "^0.25.3",
|
||||||
"astro": "^1.6.10",
|
"astro": "^1.6.11",
|
||||||
"astro-compress": "^1.1.9",
|
"astro-compress": "^1.1.10",
|
||||||
"astro-critters": "^1.1.9",
|
"astro-critters": "^1.1.10",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.28.0",
|
"eslint": "^8.28.0",
|
||||||
"eslint-config-neon": "^0.1.40",
|
"eslint-config-neon": "^0.1.40",
|
||||||
|
|||||||
@@ -19,13 +19,15 @@ import { ResultingCode } from '../../components/ResultingCode.jsx';
|
|||||||
<DiscordMessage
|
<DiscordMessage
|
||||||
interaction={{
|
interaction={{
|
||||||
author: {
|
author: {
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
},
|
},
|
||||||
command: 'ping',
|
command: 'ping',
|
||||||
}}
|
}}
|
||||||
author={{
|
author={{
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
time: 'Today at 21:00',
|
time: 'Today at 21:00',
|
||||||
}}
|
}}
|
||||||
@@ -154,13 +156,15 @@ client.on('interactionCreate', async (interaction) => {
|
|||||||
<DiscordMessage
|
<DiscordMessage
|
||||||
interaction={{
|
interaction={{
|
||||||
author: {
|
author: {
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
},
|
},
|
||||||
command: 'server',
|
command: 'server',
|
||||||
}}
|
}}
|
||||||
author={{
|
author={{
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
time: 'Today at 21:00',
|
time: 'Today at 21:00',
|
||||||
}}
|
}}
|
||||||
@@ -202,13 +206,15 @@ client.on('interactionCreate', async (interaction) => {
|
|||||||
<DiscordMessage
|
<DiscordMessage
|
||||||
interaction={{
|
interaction={{
|
||||||
author: {
|
author: {
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
},
|
},
|
||||||
command: 'user',
|
command: 'user',
|
||||||
}}
|
}}
|
||||||
author={{
|
author={{
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
time: 'Today at 21:00',
|
time: 'Today at 21:00',
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -9,13 +9,15 @@ import { DiscordMessages, DiscordMessage, DiscordMessageEmbed } from '@discordjs
|
|||||||
<DiscordMessage
|
<DiscordMessage
|
||||||
reply={{
|
reply={{
|
||||||
author: {
|
author: {
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
},
|
},
|
||||||
content: 'Test',
|
content: 'Test',
|
||||||
}}
|
}}
|
||||||
author={{
|
author={{
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
time: 'Today at 21:00',
|
time: 'Today at 21:00',
|
||||||
}}
|
}}
|
||||||
@@ -24,7 +26,8 @@ import { DiscordMessages, DiscordMessage, DiscordMessageEmbed } from '@discordjs
|
|||||||
</DiscordMessage>
|
</DiscordMessage>
|
||||||
<DiscordMessage
|
<DiscordMessage
|
||||||
author={{
|
author={{
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
time: 'Today at 21:00',
|
time: 'Today at 21:00',
|
||||||
}}
|
}}
|
||||||
@@ -39,13 +42,15 @@ import { DiscordMessages, DiscordMessage, DiscordMessageEmbed } from '@discordjs
|
|||||||
<DiscordMessage
|
<DiscordMessage
|
||||||
reply={{
|
reply={{
|
||||||
author: {
|
author: {
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
},
|
},
|
||||||
content: 'Test',
|
content: 'Test',
|
||||||
}}
|
}}
|
||||||
author={{
|
author={{
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
time: 'Today at 21:00',
|
time: 'Today at 21:00',
|
||||||
}}
|
}}
|
||||||
@@ -58,13 +63,15 @@ import { DiscordMessages, DiscordMessage, DiscordMessageEmbed } from '@discordjs
|
|||||||
<DiscordMessage
|
<DiscordMessage
|
||||||
reply={{
|
reply={{
|
||||||
author: {
|
author: {
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
},
|
},
|
||||||
content: 'Test',
|
content: 'Test',
|
||||||
}}
|
}}
|
||||||
author={{
|
author={{
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
time: 'Today at 21:00',
|
time: 'Today at 21:00',
|
||||||
}}
|
}}
|
||||||
@@ -72,7 +79,8 @@ import { DiscordMessages, DiscordMessage, DiscordMessageEmbed } from '@discordjs
|
|||||||
<>
|
<>
|
||||||
<DiscordMessageEmbed
|
<DiscordMessageEmbed
|
||||||
author={{
|
author={{
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@@ -80,7 +88,8 @@ import { DiscordMessages, DiscordMessage, DiscordMessageEmbed } from '@discordjs
|
|||||||
<DiscordMessageEmbed footer={{ content: 'Footer' }} />
|
<DiscordMessageEmbed footer={{ content: 'Footer' }} />
|
||||||
<DiscordMessageEmbed
|
<DiscordMessageEmbed
|
||||||
author={{
|
author={{
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
}}
|
}}
|
||||||
title={{ title: 'Title' }}
|
title={{ title: 'Title' }}
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ import { DiscordMessages, DiscordMessage } from '@discordjs/ui';
|
|||||||
<DiscordMessage
|
<DiscordMessage
|
||||||
interaction={{
|
interaction={{
|
||||||
author: {
|
author: {
|
||||||
avatar: 'https://cdn.discordapp.com/avatars/81440962496172032/81c0df2befe565b05018da6b026babb0.webp?size=160',
|
avatar:
|
||||||
|
'https://cdn.discordapp.com/guilds/222078108977594368/users/81440962496172032/avatars/c059c5d04d717ea05790f7a6447e4843.webp?size=160',
|
||||||
username: 'Crawl',
|
username: 'Crawl',
|
||||||
},
|
},
|
||||||
command: 'upgrade',
|
command: 'upgrade',
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
"react-syntax-highlighter": "^15.5.0",
|
"react-syntax-highlighter": "^15.5.0",
|
||||||
"react-use": "^17.4.0",
|
"react-use": "^17.4.0",
|
||||||
"rehype-ignore": "^1.0.3",
|
"rehype-ignore": "^1.0.3",
|
||||||
"rehype-pretty-code": "^0.5.0",
|
"rehype-pretty-code": "^0.5.1",
|
||||||
"rehype-raw": "^6.1.1",
|
"rehype-raw": "^6.1.1",
|
||||||
"rehype-slug": "^5.1.0",
|
"rehype-slug": "^5.1.0",
|
||||||
"remark-gfm": "^3.0.1",
|
"remark-gfm": "^3.0.1",
|
||||||
|
|||||||
3
packages/discord.js/typings/index.d.ts
vendored
3
packages/discord.js/typings/index.d.ts
vendored
@@ -1,3 +1,6 @@
|
|||||||
|
// DOM types required for undici
|
||||||
|
/// <reference lib="dom" />
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ActionRowBuilder as BuilderActionRow,
|
ActionRowBuilder as BuilderActionRow,
|
||||||
MessageActionRowComponentBuilder,
|
MessageActionRowComponentBuilder,
|
||||||
|
|||||||
Reference in New Issue
Block a user