-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
base: main
Are you sure you want to change the base?
Conversation
feat(XOUL AI): add Presence |
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.
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", |
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.
Logo must be 512x512
browsingTimestamp = Math.floor(Date.now() / 1000); | ||
|
||
const enum Assets { | ||
Logo = "https://i.imgur.com/aTWK1eZ.png", |
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.
Logo must be 512x512
button = { | ||
label: "View Page", | ||
url: href, | ||
}; |
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 not allowed, since u can't have button to the homepage.
button = { | |
label: "View Page", | |
url: href, | |
}; | |
button = { | |
label: "View Page", | |
url: href, | |
}; |
const chatImage = document.querySelector( | ||
"[class^='ChatBubble_image']" | ||
) as HTMLImageElement; | ||
if (chatImage) presenceData.largeImageKey = chatImage?.src; | ||
else presenceData.details = "Chatting"; |
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.
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; |
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.
remove
if (pathname.split("/")[3] === "edit") | ||
presenceData.details = `Editing ${scenarioName ?? ""} scenario`; | ||
else { | ||
presenceData.details = `Viewing ${scenarioName ?? ""} scenario`; |
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.
presenceData.details = `Viewing ${scenarioName ?? ""} scenario`; | |
presenceData.details = `Viewing ${scenarioName ?? "a"} scenario`; |
const scenarioImage = document.querySelector( | ||
"[class^='ViewScenario_image__']" | ||
) as HTMLImageElement; | ||
if (scenarioImage) presenceData.largeImageKey = scenarioImage?.src; |
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.
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"}`; |
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.
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"}`; |
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.
presenceData.details = `Viewing ${xoulName ?? "Xoul"}`; | |
presenceData.details = `Viewing ${xoulName ?? "a xoul"}`; |
const xoulImage = document.querySelector( | ||
"[class^='ViewXoul_image__']" | ||
) as HTMLImageElement; | ||
if (xoulImage) presenceData.largeImageKey = xoulImage?.src; |
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.
Same as other ones
Description
Added new presence for xoul.ai.
Acknowledgements
yarn format
Screenshots
Proof showing the creation/modification is working as expected