8000 docs: Rework of the Presence reference page by itsmeeudrino · Pull Request #1062 · PreMiD/PreMiD · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Draft
wants to merge 17 commits into
base: monorepo
Choose a base branch
from

Conversation

itsmeeudrino
Copy link
@itsmeeudrino itsmeeudrino commented Jul 28, 2024

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

Copy link
Author
@itsmeeudrino itsmeeudrino left a 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!

Comment on lines 8 to 11
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).
Copy link
Author

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

## constructor(options: [`PresenceOptions`](#presence-options)) {#constructor}


## setActivity(data: [`PresenceData`](#presence-data) | [`Slideshow`](#slideshow))
Copy link
Author

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

type: ActivityType.Watching,
details: "The Best Speedtech Cup of The Day in 2024!",
state: "WirtualTV",
largeImageKey: "<thumbnail_url>",

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?


- `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.

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)

Suggested change
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.


- `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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this?

Suggested change
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.

Copy link
@DarkVillager DarkVillager left a 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}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```ts{4-5}
```ts

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These numbers are used for line highlights
image

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Author

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}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```ts{16}
```ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0