Skip to content
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

feat(presence): add XOUL AI Presence #8907

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

agahEbrahimi
Copy link

@agahEbrahimi agahEbrahimi commented Nov 24, 2024

Description

Added new presence for xoul.ai.

Acknowledgements

Screenshots

Proof showing the creation/modification is working as expected 2 1 3 4 5

@darkvillager2
Copy link
Contributor

feat(XOUL AI): add Presence

Copy link
Contributor

@darkvillager2 darkvillager2 left a comment

Choose a reason for hiding this comment

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

Heyyo, thanks for your Pull Request.

I have somethings that i'd like to see changed.
I'm not an official reviewer, but i have made my fair share of PRs.

If you have any questions feel free to comment or dm me on discord (@Dark_Ville)

},
"url": "xoul.ai",
"version": "1.0.0",
"logo": "https://i.imgur.com/aTWK1eZ.png",
Copy link
Contributor

Choose a reason for hiding this comment

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

Logo must be 512x512

browsingTimestamp = Math.floor(Date.now() / 1000);

const enum Assets {
Logo = "https://i.imgur.com/aTWK1eZ.png",
Copy link
Contributor

Choose a reason for hiding this comment

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

Logo must be 512x512

Comment on lines +20 to +23
button = {
label: "View Page",
url: href,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not allowed, since u can't have button to the homepage.

Suggested change
button = {
label: "View Page",
url: href,
};
button = {
label: "View Page",
url: href,
};

Comment on lines +36 to +40
const chatImage = document.querySelector(
"[class^='ChatBubble_image']"
) as HTMLImageElement;
if (chatImage) presenceData.largeImageKey = chatImage?.src;
else presenceData.details = "Chatting";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const chatImage = document.querySelector(
"[class^='ChatBubble_image']"
) as HTMLImageElement;
if (chatImage) presenceData.largeImageKey = chatImage?.src;
else presenceData.details = "Chatting";
presenceData.largeImageKey = document.querySelector<HTMLImageElement>(
"[class^='ChatBubble_image']"
)?.src ?? Assets.Logo;
if (presenceData.largeImageKey === Assets.Logo) presenceData.details = "Chatting";

break;
}
case "profile": {
const { pathname } = document.location;
Copy link
Contributor

Choose a reason for hiding this comment

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

remove

if (pathname.split("/")[3] === "edit")
presenceData.details = `Editing ${scenarioName ?? ""} scenario`;
else {
presenceData.details = `Viewing ${scenarioName ?? ""} scenario`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
presenceData.details = `Viewing ${scenarioName ?? ""} scenario`;
presenceData.details = `Viewing ${scenarioName ?? "a"} scenario`;

Comment on lines +69 to +72
const scenarioImage = document.querySelector(
"[class^='ViewScenario_image__']"
) as HTMLImageElement;
if (scenarioImage) presenceData.largeImageKey = scenarioImage?.src;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const scenarioImage = document.querySelector(
"[class^='ViewScenario_image__']"
) as HTMLImageElement;
if (scenarioImage) presenceData.largeImageKey = scenarioImage?.src;
presenceData.largeImageKey = document.querySelector<HTMLImageElement>(
"[class^='ViewScenario_image__']"
)?.src ?? Assets.Logo

?.textContent?.trim();

if (pathname.split("/")[3] === "edit")
presenceData.details = `Editing ${xoulName ?? "Xoul"}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
presenceData.details = `Editing ${xoulName ?? "Xoul"}`;
presenceData.details = `Editing ${xoulName ?? "a xoul"}`;

if (pathname.split("/")[3] === "edit")
presenceData.details = `Editing ${xoulName ?? "Xoul"}`;
else {
presenceData.details = `Viewing ${xoulName ?? "Xoul"}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
presenceData.details = `Viewing ${xoulName ?? "Xoul"}`;
presenceData.details = `Viewing ${xoulName ?? "a xoul"}`;

Comment on lines +88 to +91
const xoulImage = document.querySelector(
"[class^='ViewXoul_image__']"
) as HTMLImageElement;
if (xoulImage) presenceData.largeImageKey = xoulImage?.src;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as other ones

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