Giter Site home page Giter Site logo

discordjs / website Goto Github PK

View Code? Open in Web Editor NEW
187.0 12.0 116.0 19.75 MB

The discord.js site what else

License: Other

JavaScript 2.98% HTML 2.57% Vue 62.27% TypeScript 29.73% CSS 2.44%
discord discordjs discord-bot docgen documentation jsdoc vuejs vue hacktoberfest

website's Introduction


discord.js


Discord server Build status Dependencies Patreon

Vue 3 + Typescript + Vite

This template should help get you started developing with Vue 3 and Typescript in Vite.

Recommended IDE Setup

VSCode + Volar.

Using Volar

Run Volar: Switch TS Plugin on/off from VSCode command palette.

website's People

Contributors

aemino avatar amishshah avatar bdistin avatar castdrian avatar ckohen avatar danktuary avatar dependabot[bot] avatar devsnek avatar didinele avatar drahcirius avatar favna avatar fyko avatar gawdl3y avatar goddere2d avatar icrawl avatar jiralite avatar lewdcario avatar mainleau avatar markni avatar meew0 avatar notsugden avatar papaia avatar rdambrosio016 avatar vaporoxx avatar yuta0801 avatar zacwm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

Error in console while loading class

I decided to understand the documentation code and test it. Replaced everything you need, while an error appears in the console, and the page remains blank.

marked.js:2597 Uncaught (in promise) Error: marked(): input parameter is undefined or null
   at marked (marked.js:2597)
   at markdown (markdown.ts:30)
   at ClassEvent.vue:64
   at ComputedRefImpl.reactiveEffect [as effect] (reactivity.esm-bundler.js:42)
   at ComputedRefImpl.get value [as value] (reactivity.esm-bundler.js:864)
   at unref (reactivity.esm-bundler.js:778)
   at Object.get (reactivity.esm-bundler.js:781)
   at Proxy._sfc_render (ClassEvent.vue:32)
   at renderComponentRoot (runtime-core.esm-bundler.js:1166)
   at componentEffect (runtime-core.esm-bundler.js:5201)

изображение

I checked everything on the local machine.

Various `|` (or) returns do not display correctly on the documentation

Which package is this bug report for?

discord.js

Issue description

At:

The Returns element does not resolve to a proper Foo|Bar format, instead resorting to FooBar (links do work as expected).
I was not able to find any more of these but there is a big chance there are more than just these 3.

https://github.com/discordjs/discord.js/blob/950fc47234ed7702a20c90246823a5215c75e84f/packages/discord.js/src/structures/CommandInteractionOptionResolver.js#L146

https://github.com/discordjs/discord.js/blob/950fc47234ed7702a20c90246823a5215c75e84f/packages/discord.js/src/managers/GuildChannelManager.js#L84

https://github.com/discordjs/discord.js/blob/950fc47234ed7702a20c90246823a5215c75e84f/packages/discord.js/src/structures/CommandInteractionOptionResolver.js#L261

Example:
Schermafbeelding 2023-03-21 om 20 53 15

Code sample

No response

Package version

Does not apply

Node.js version

Does not apply

Operating system

Chrome 111.0.5563.64, also tested on Safari 14.1.2

Priority this issue should have

Low (slightly annoying)

Which partials do you have configured?

Not applicable (subpackage bug)

Which gateway intents are you subscribing to?

Not applicable (subpackage bug)

I have tested this issue on a development release

No response

update the documentation pages

The documentation page is apparently very outdated according to Benjamin Kirby and should really be updated or removed.

Expand all extended typedefs by default

Discord.js has multiple typedefs which type is not an Object, but instead points to another base typedef. An example of this is MessageActionRowOptions and this is how it looks when you first open the page:
image
What I'd like to suggest is for the extended typedef(s) to always be extended by default so that users don't accidentally miss important properties that are required/accepted in a typedef. I remember suggesting this once and being told that it would be hard to tell which ones should be expanded and which ones shouldn't, which is why I'm suggesting to expand all by default and let the user then close whichever ones they don't need to see. I believe the typedef with the most extended typedefs has 2 of them so this shouldn't be much of a problem either.

Consider adjusting color a bit?

The color of new main page's "most popular" label and top note kills my eyes, almost like the plain blue color (rgb(0, 0, 255)). I know this is extremely opinionated, but may it be possible to adjust this color to, e.g., rgb(37, 48, 153) or old "main" color (rgb(48, 57, 149))? Screenshots attached for ease of preview.

Updated color:
Updated color

Current color:
Current color

Couldn't load the documentation data. TypeError: NetworkError when attempting to fetch resource.

When I got to https://discord.js.org/#/docs/discord.js/main/general/welcome I see Couldn't load the documentation data. TypeError: NetworkError when attempting to fetch resource..

Here's is a fuller log from Firefox's console:

Failed to load ‘https://api.npmjs.org/downloads/range/2013-08-21:2100-08-21/discord.js’. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with ‘Error: no-response :: [{"url":"https://api.npmjs.org/downloads/range/2013-08-21:2100-08-21/discord.js"}]’. [sw.js:1:626](https://discord.js.org/sw.js)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.npmjs.org/downloads/range/2013-08-21:2100-08-21/discord.js. (Reason: CORS request did not succeed). Status code: (null).

Failed to load ‘https://docs.discordjs.dev/docs/discord.js/main.json’. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with ‘Error: no-response :: [{"url":"https://docs.discordjs.dev/docs/discord.js/main.json"}]’. [sw.js:1:626](https://discord.js.org/sw.js)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://docs.discordjs.dev/docs/discord.js/main.json. (Reason: CORS request did not succeed). Status code: (null).

Failed to load ‘https://docs.discordjs.dev/docs/discord.js/main.json’. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with ‘Error: no-response :: [{"url":"https://docs.discordjs.dev/docs/discord.js/main.json"}]’. [sw.js:1:626](https://discord.js.org/sw.js)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://docs.discordjs.dev/docs/discord.js/main.json. (Reason: CORS request did not succeed). Status code: (null).

Error: Promised response from onMessage listener went out of scope

Can't access docs: TypeError: NetworkError when attempting to fetch resource."

I can't access the documentation. Error from the console:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://raw.githubusercontent.com/discordjs/discord.js/docs/stable.json. (Reason: CORS request did not succeed).
Failed to load ‘https://raw.githubusercontent.com/discordjs/discord.js/docs/stable.json’. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with ‘Error: no-response :: [{"url":"https://raw.githubusercontent.com/discordjs/discord.js/docs/stable.json"}]’. sw.js:1:594
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.npmjs.org/downloads/range/2013-08-21:2100-08-21/discord.js. (Reason: CORS request did not succeed).
Failed to load ‘https://api.npmjs.org/downloads/range/2013-08-21:2100-08-21/discord.js’. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with ‘Error: no-response :: [{"url":"https://api.npmjs.org/downloads/range/2013-08-21:2100-08-21/discord.js"}]’. sw.js:1:594
The resource at “https://discord.js.org/assets/docs.eea0cb6a.js” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. discord.js.org
The resource at “https://discord.js.org/assets/chevron-down.40ab8f75.js” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. discord.js.org
The resource at “https://discord.js.org/assets/headlessui.esm.ddfe9e3e.js” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. discord.js.org
The resource at “https://discord.js.org/assets/Spinner.ce5d90e3.js” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. discord.js.org
The resource at “https://discord.js.org/assets/[file].9f107064.js” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. discord.js.org
The resource at “https://discord.js.org/assets/SourceButton.vue_vue&type=script&setup=true&lang.daca1f17.js” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. discord.js.org

[Bug] Documentation will fail to load after first visit when HTTPS only is enabled

Expected Behaviour

When reloading or re-visiting the documentation, it should load.

Current Behaviour

After reloading or re-visiting, the documentation will fail to load with the error:

Couldn't load the documentation data.
TypeError: NetworkError when attempting to fetch resource.
Console log
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://raw.githubusercontent.com/discordjs/docs/main/discord.js/stable.json. (Reason: CORS request did not succeed). Status code: (null).

Failed to load 'https://raw.githubusercontent.com/discordjs/docs/main/discord.js/stable.json'. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with 'Error: no-response :: [{"url":"https://raw.githubusercontent.com/discordjs/docs/main/discord.js/stable.json"}]'. [sw.js:1:581](https://discord.js.org/sw.js)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.github.com/repos/discordjs/discord.js. (Reason: CORS request did not succeed). Status code: (null).

Failed to load 'https://api.github.com/repos/discordjs/discord.js'. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with 'Error: no-response :: [{"url":"https://api.github.com/repos/discordjs/discord.js"}]'. [sw.js:1:581](https://discord.js.org/sw.js)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.github.com/repos/discordjs/discord.js/stats/contributors. (Reason: CORS request did not succeed). Status code: (null).

Failed to load 'https://api.github.com/repos/discordjs/discord.js/stats/contributors'. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with 'Error: no-response :: [{"url":"https://api.github.com/repos/discordjs/discord.js/stats/contributors"}]'. [sw.js:1:581](https://discord.js.org/sw.js)
TypeError: NetworkError when attempting to fetch resource. [index.154d11fb.js:1:1235](https://discord.js.org/assets/index.154d11fb.js)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.github.com/repos/discordjs/discord.js/tags. (Reason: CORS request did not succeed). Status code: (null).

Failed to load 'https://api.github.com/repos/discordjs/discord.js/tags'. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with 'Error: no-response :: [{"url":"https://api.github.com/repos/discordjs/discord.js/tags"}]'. [sw.js:1:581](https://discord.js.org/sw.js)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.github.com/repos/discordjs/discord.js/branches. (Reason: CORS request did not succeed). Status code: (null).

Failed to load 'https://api.github.com/repos/discordjs/discord.js/branches'. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with 'Error: no-response :: [{"url":"https://api.github.com/repos/discordjs/discord.js/branches"}]'. [sw.js:1:581](https://discord.js.org/sw.js)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.npmjs.org/downloads/range/2013-08-21:2100-08-21/discord.js. (Reason: CORS request did not succeed). Status code: (null).

Failed to load 'https://api.npmjs.org/downloads/range/2013-08-21:2100-08-21/discord.js'. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with 'Error: no-response :: [{"url":"https://api.npmjs.org/downloads/range/2013-08-21:2100-08-21/discord.js"}]'. [sw.js:1:581](https://discord.js.org/sw.js)
The resource at “https://discord.js.org/assets/docs.b7d139dd.js” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. [discord.js.org](https://discord.js.org/#/docs/discord.js/stable/general/welcome)
The resource at “https://discord.js.org/assets/chevron-down.046bf525.js” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. [discord.js.org](https://discord.js.org/#/docs/discord.js/stable/general/welcome)
The resource at “https://discord.js.org/assets/headlessui.esm.5f2b3dc4.js” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. [discord.js.org](https://discord.js.org/#/docs/discord.js/stable/general/welcome)
The resource at “https://discord.js.org/assets/Spinner.c85b1c37.js” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. [discord.js.org](https://discord.js.org/#/docs/discord.js/stable/general/welcome)
The resource at “https://discord.js.org/assets/[file].793fe219.js” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. [discord.js.org](https://discord.js.org/#/docs/discord.js/stable/general/welcome)
The resource at “https://discord.js.org/assets/SourceButton.vue_vue&type=script&setup=true&lang.0296927c.js” preloaded with link preload was not used within a few seconds. Make sure all attributes of the preload tag are set correctly. [discord.js.org](https://discord.js.org/#/docs/discord.js/stable/general/welcome)

Steps to Reproduce

  1. Enable HTTPS only mode for the domain.
  2. Clear cache and cookies for the domain.
  3. Visit the documentation, it loads as expected.
  4. Reload, the documentation now fails to load.

Detailed Description

I'm left with two options if I want to use the documentation,

  • Disable HTTPS only mode for the domain.
  • Load the site while in private browsing mode.

While turning HTTPS only off will allow the documentation to load, I'm uncomfortable doing so, even if it's just for this domain. So I'm stuck using the documentation in private browsing, otherwise it's completely unusable.
And private browsing is a poor experience for my workflow. (Re-logging into everything anytime I work with the Discord.js API wrapper is a pain in the ass.)

User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0

Is there a way to programmatically search the Discord.js docs?

I'm trying to create a command in a Discord.js bot that searches the Discord.js documentation. However, I have come across difficulties due to the way scripts are run dynamically in order to fetch the search results.

Is there a script that I can access to get the search results instead of attempting to scrape the Discord.js documentation website. If so, how would I go about using that script (using Node.js)?

I'm not sure if this issue should be here or in the Discord.js module repository. Please notify me if it should be moved.

By the way, thank you for such a great module. I am very grateful for the work you have put in. I hope you continue to make Discord.js the best it can possibly be.

Discord.js Docs site Down

Hi,
I think something went wrong with the new commits not entirely sure what but can't really open the docs site... or is it purposely down?
image

Docs Unavailable

Which package is this bug report for?

discord.js

Issue description

Trying to navigate to the docs doesn't work.

Repro:

  1. Open the URL https://discord.js.org/#/docs/discord.js/main/general/welcome

Outcome:
The following text is displayed:

Couldn't load the documentation data.
Error: Failed to fetch docs data file from GitHub

Code sample

No response

Package version

14.1.1

Node.js version

16.16.0

Operating system

No response

Priority this issue should have

Medium (should be fixed soon)

Which partials do you have configured?

Not applicable (subpackage bug)

Which gateway intents are you subscribing to?

Not applicable (subpackage bug)

I have tested this issue on a development release

No response

Consider using a max-w-prose class on the homepage

The two paragraphs on the homepage tend to expand as the screen width increases. This can negatively impact readability.

Below is what the page looks like when the tailwind class max-w-prose is applied to the div container for the 2 paragraphs.

discord js org_

Npm Install Clipboard

It would be fast and efficient if "npm install discord.js" in Discord JS Org website has a copy to clipboard button.

Allow docs search to search return / parameter / property types

Currently, the search does not consider return type of methods, type of parameters or type of properties for the search. This can make it hard to see where types are used.

Example: trying to find how to get an instance of ClientUser.

https://discord.js.org/#/docs/main/stable/search?q=ClientUser
This will not consider Client#user as a search result.

It would be great to be able to find all methods/properties that use or return a particular type.

Search doesn't properly link static properties/methods

When searching for a static property - say Intents.FLAGS - search will send you to the correct class page, however, the scrollTo argument will be missing the s- prefix that indicates that a property or method is static and thus failing to scroll to it.

Change the website title when viewing a property

So today I have a suggestion: change the website title based on the property you are viewing.

Why?
If you use discord.js (or any other library), you know that sometimes you need to open a lot of tabs, and it's annoying to switch between the tabs to find a specific page you've previously opened, because it's always discord.js. With the page named with the property name (and maybe the type), it would be much easier, like BaseClient - discord.js/BaseClient (class) - discord.js.

docs down??

sorry if im a moron... but i cant seem to load the docs? on two seperate pcs and browser, on my phone, and my friend cant load them either. is it down?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.