-
-
Notifications
You must be signed in to change notification settings - Fork 141
docs: Rework of the Presence reference page #1062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: monorepo
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are some of the things i wish to improve, feel free to suggest others!
apps/docs/reference/presence.md
Outdated
The [`Presence`](#presence) class represents a client, which can be used to interact with the PreMiD extension. | ||
|
||
### Example | ||
|
||
```javascript | ||
It also provides lifecycle events via [`UpdateData`](#update_data) and [`iFrameData`](#iframe_data). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spent some time trying to better explain what the Presence class does, from my understanding it is like an SDK to communicate with the PreMiD extension, with extra utilites for translations and DOM access.
maybe can be explained differently idk
apps/docs/reference/presence.md
Outdated
## constructor(options: [`PresenceOptions`](#presence-options)) {#constructor} | ||
|
||
|
||
## setActivity(data: [`PresenceData`](#presence-data) | [`Slideshow`](#slideshow)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i've thought maybe we should add an example with DOM stuff, but maybe it's better to leave it to the Guide section instead
apps/docs/reference/presence.md
Outdated
type: ActivityType.Watching, | ||
details: "The Best Speedtech Cup of The Day in 2024!", | ||
state: "WirtualTV", | ||
largeImageKey: "<thumbnail_url>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could also be Assets.Logo?
apps/docs/reference/presence.md
Outdated
|
||
- `event` (`string`): The event to listen to. | ||
This property is required to make your presence work, because it uses your application id to display its logo and assets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't true, should be more smth like this (or smth else)
This property is required to make your presence work, because it uses your application id to display its logo and assets. | |
This property is required to make your presence work, because it uses your application id to identify its self to discord. |
apps/docs/reference/presence.md
Outdated
|
||
- `event` (`string`): The event to listen to. | ||
This property is required to make your presence work, because it uses your application id to display its logo and assets. | ||
You can get it on your [applications page](https://discordapp.com/developers/applications) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this?
You can get it on your [applications page](https://discordapp.com/developers/applications) | |
You can get it on your [applications page](https://discordapp.com/developers/applications) | |
Here you can create an application. Make sure to give it the same name as the service, because if there's no name set in the presenceData it defaults to the application name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should fix it not working
|
||
Example | ||
|
||
```ts{4-5} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```ts{4-5} | |
```ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is an extended markdown file, to preview check the deployed build in inital comment
|
||
Creates a new `Presence` instance. | ||
```ts{16} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```ts{16} | |
```ts |
This PR is a WIP that aims to improve the docs' Presence reference page
There's some methods still missing, however i wanted to share what i've done so far.
any kind of feedback would be very appreciated!
preview deployment: https://docs.pmd.eudrino.crun.zip/reference/presence.html