All presences are now stored here: https://github.com/PreMiD/Presences
Version 2.x
introduces the Presence Store. Users now have the ability to manually add and remove their favourite presences through the user interface of the website.
Before getting started, it is highly recommended that you look at our presence guidelines.
All Presences are made using TypeScript.
TypeScript has some extra spicy type definitions over JavaScript, so fixing and identifying bugs is way easier.
git clone https://github.com/PreMiD/Presences
.Presences
foldernpm i
(Or your package manager of choice)npx pmd
(or run pmd
with the package manager of your choice)npx pmd
This will start a TypeScript compiler in that Presence's folder, now when you edit the
presence.ts
it will automatically compile the presence for you.
For inspiration or examples on how to structure your Presence's code, take a look at existing Presences like 1337x or 9GAG
For more information about the Presence
class click here.
Since v2.2.0 there are now Slideshows, this allows you to show multiple PresenceData
interfaces on an interval, for more information click about the Slideshow
class here.
A lot of websites are using iframes (Inlineframes). These html tags can contain multiple sources such as videos. But they're not relevant every time. Some are hidden or just not actively used. Check if you can extract the information you need without them before you do unnecessary work.
document.querySelectorAll("iframe")
.If you find that your data is in a iFrame you need to do the following:
iframe.ts
file.true
in your metadata file.const iframe = new iFrame();
iframe.on("UpdateData", async () => {
//Get all the data you need out of the iFrame save them in variables and then send them using iframe.send
iframe.send({
//sending data
video: video,
time: video.duration
});
});
presence.on("iFrameData", (data) => {
iFrameVideo = data.video;
currentTime = data.time;
});
Note: This needs to be placed outside of the updateData event.
The website you are developing on is automatically reloading every time you save a file in your folder.
console.log("Test");
between your code and see if your browser console gives you that output. If yes then go on and try again after the next function. If not then there is an error above.