Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Hans5958/PreMiD-Presences-Personal-Old

Hans5958's Personal PreMiD Presences

This repository contains the source code of my presences that are created for PreMiD/Presences (and the store)
If you want to use one of my presence, please go to here.
You can report issues related to my presence on either this repository or the main repository.

Info for starters:

PreMiD is an application that uses the Discord Rich Presence feature to show activities that you do on your browser to Discord. It consists of an extension/addon and an application. The extension/addon has a good support on Chrome and Chromium-based browsers, and works 90% on Firefox. The application works on Windows and Mac. There's also a Linux version which is in development.

The way PreMiD works is as follows.

  1. PreMiD detects the website domain you visited, and loads the related script code, which is called a "presence".
  2. The script take essential informations related to the visited page.
  3. The script sends the information to be displayed to the extension.
  4. The extension forwards the information to the application.
  5. The application beams the information to your Discord application, specifically the Rich Presence part of Discord.
  6. The information is displayed on your "playing" section.

Keep in mind that there are a thousand ways this app could be broken, or at least that's what would a presence developer (like me) said. Let me tell you, one way to break PreMiD is to remove all of the default presences.

Before you ask, no, PreMiD is not against the ToS.

Info for people coming from PreMiD:

If you look closely to the files, it is quite different than the rest of the main repository. Here are the list of differences on the script.

  1. I use tabs for indentations instead of two spaces.
  2. I don't use semicolons.
  3. I built my own structure/base for my presences. See the base collection and my explanation of how it is built.
  4. There are no limits for the width.
  5. All presence are built with TypeScript. (may not relevant since all presences are now built with TS)
  6. The folder structure differs, since, for now, I only support websites and I only have a few presences.
  7. Prettier are only used when needed. (only for TS files)

Because of this, I need to adjust my presences before making pull requests to the main repository. I used multiple scripts so I could do the adjustments easier.

I also made other projects related to PreMiD, such as the metadata test suite.

Folder structure

/presences
โ””โ”€ /(presence - If coded with TypeScript, make sure to include `presence.ts`, and `tsconfig.json`)
   โ””โ”€ /dist (contains code that will be used in store, must have `metadata.json` and `presence.js` in it.)