When publishing Presences to the Presences repository, we require you to follow a set of guidelines. To some, these strict rules may seem harsh. However, the implementation of these rulesets will keep us and the users from running into any issues.
The general rules of presence development are as follows:
.onion
TLDs) or websites with free domains/hosts (for e.g., .TK
[all free Freenom domains], .RF
, GD
, etc) are not permitted, exceptions can be made if a proof is presented showing that they paid for the domain.chrome://
, about:
pages, etc) are not allowed as they require an experimental flag to be enabled on the user's end and could potentially cause damage to their browsers.Presence
class, you are allowed to do your own function and you need to tell us about it in Pull Request description..xyz
, .club
and so on.multiLanguage
with the provided strings. If your presence requires custom strings, then you shouldn't use multiLanguage
until the presence gets 1000 users. You can find an example here.dist
folder, presence.ts
file, iframe.ts
file, and metadata.json
file is mandatory so the result would be what is represented in the following schema:presence
├── dist
│ └── metadata.json
├── presence.ts
└── tsconfig.json
or if you're using a iframe.ts
file:
presence
├── dist
│ └── metadata.json
├── presence.ts
├── iframe.ts
└── tsconfig.json
For the convenience of our presence developers, we have provided a schema which you can use to validate the integrity of your
metadata
file. This is entirely optional and is not required during the review process.
It is highly recommended that you organize your
metadata
file in the format shown below, and you must have grammatically correct service names, descriptions, tags, and setting fields. Anything not organized to specifications will not be permitted.
Presences of websites that have explicit content must have the
nsfw
tag, and the logo/thumbnail must not contain any of this content.
Each presence has a descriptor file called metadata.json
, the metadata has a strict standard and an example of this file can be seem below:
{
"$schema": "https://schemas.premid.app/metadata/1.7",
"author": {
"name": "USER",
"id": "ID"
},
"contributors": [
{
"name": "USER",
"id": "ID"
}
],
"service": "SERVICE",
"altnames": ["SERVICE"],
"description": {
"en": "DESCRIPTION"
},
"url": "URL",
"version": "VERSION",
"logo": "URL",
"thumbnail": "URL",
"color": "#HEX000",
"tags": ["TAG1", "TAG2"],
"category": "CATEGORY",
"regExp": "REGEXP",
"iFrameRegExp": "REGEXP",
"iframe": false,
"readLogs": false,
"settings": [
{
"id": "multiLanguage",
"multiLanguage": true
}
{
"id": "ID",
"title": "DISPLAY TITLE",
"icon": "FONTAWESOME ICON",
"value": true
},
{
"id": "ID",
"if": {
"ID": true
},
"title": "DISPLAY TITLE",
"icon": "FONTAWESOME ICON",
"value": "\"%song%\" by %artist%",
"placeholder": "use %song% or %artist%"
},
{
"id": "ID",
"title": "DISPLAY TITLE",
"icon": "FONTAWESOME ICON",
"value": 0,
"values": ["1", "2", "etc."]
}
]
}
If a field is listed as optional on the documentation or there is a
*
next to the key, and your presence uses the default value for it, do not include it in themetadata
file. (for e.g., a presence without iframe support would not need theiframe
field.)
All images in the
metadata
file must be hosted oni.imgur.com
. Using content hosted on the website is not permitted as they can change the paths and files unwillingly.
A list of fields and their rules are listed below:
$schema
author
*contributors
service
/websites/Y/YouTube/
, the service name must be YouTube
.YouTube
is permitted because that is the official name and is descriptive, while youtube.com
is not. Top
is a non-descriptive name, so using the url top.gg
is required.)*altnames
tags
.description
metadata.json
and change the descriptions if necessary.url
http
or https
), and do not include query parameters in the url (for e.g., www.google.com/search?gws_rd=ssl
which should be www.google.com
)version
<MAJOR>.<MINOR>.<PATCH>
. Anything else like 1.0.0.1
, 1.0
, 1
, 1.0.0-BETA
or changing 1.0.0
to 2.0.0
on a bug fix/small change is not permitted.1.0.0
unless told otherwise, other versions will not be permitted.logo
1:1
aspect ratio.512x512
pixels. You can resize it using a tool like imageresizer.thumbnail
color
#000000
and #FFFFFF
.tags
amazon-web-services
and aws
)NSFW
tag if the presence is for an NSFW website.category
anime
when the website isn't related to anime).*regExp
*iFrameRegExp
readLogs
boolean
value (e.g. true
or false
).warning
VLC
.settings
%song% by %artist%
), you must have the variables surrounded by a percent sign on either side. Variables like %var
, var%
, or %%var%%
and anything in between are not permitted for the sake of standardization.SHOW BROWSING STATUS
will not be permitted; however, names such as Show Browsing Status
or Show browsing status
are permitted.multiLanguage
option it can have the following types:
general.json
from the Localization repo or from the presence file (e.g. when the name of the presence is YouTube, the extension will get strings from youtube.json
too.)youtube
) which will specify the name of the files that you want to get strings from.["youtube", "discord"]
) which will specify the name of the files that you want to get strings from.The code you write must be well-written and must be readable and all strings must be grammatically correct (grammar errors on websites can be ignored).
Each presence follows a strict linting ruleset which will be checked during the review process. A couple of recommendations can be seen below.
TypeScript Plugin Recommendations for Strict Type Checking.
ESlint Recommendations.
Prettier.
Here is a list of rules you must follow when writing your presence.ts
file:
Presence
class before any other variable to avoid rare issues that may occur; this is not a requirement by design so it could be removed in the future.smallImageKey
and smallImageText
fields are intended to provide additional/secondary context (such as playing/paused
for video sites, browsing
for regular sites, and other cases) not to promote Discord profiles or anything unrelated to PreMiD.localStorage
.PMD_
.premid.app
or the presence website API. If you are using external domains, you will be required to explain why it is necessary. Only allowed API to make request is Fetch API
.delete
keyword instead. (for e.g., use delete data.startTimestamp
instead of data.startTimestamp = undefined
)Do not write your own
tsconfig.json
file, use what has been provided on documentation.
You must change the version in the metadata to be a higher value from the previous version when making changes to either the presence.ts, iframe.ts or metadata.json.
In some situations, presences may behave unexpectedly or could use some minor changes to improve their functionality. Here is a list of rules that you must follow while modifiying presences.
All code contributed to the store will be licensed under the
Mozilla Public License 2.0
.
If you need to contact someone, please use our official Discord server. All reviewers will have the
Reviewer
role on their profile.
Please keep in mind that the reviewers work voluntarily and manage other repositories in addition to this one, your pull request may not get reviewed until hours or even days after it has been created.
Always have an up-to-date fork before creating your pull request. This will help limit false positives from the checks.
The most important process of presence development is getting your presence on the store. This is done by making a pull request on GitHub on the PreMiD/Presences
repository. Our reviewers will confirm that your presence is up to standards and will push it onto the store.
Restrictions
Repetitive offenses such as breaking guidelines, spamming pull requests, threats, or innapropriate behavior will get you banned from creating presences.
In this scenario, the following changes will occur:
Reviewing
A few things you should know after opening a pull request:
Checks
Currently, a presence goes through 3 separate stages of checks. All of these checks help the reviewers determine whether your presence is suitable for deployment.
DeepScan
is a bot that checks for code quality. If you ever receive errors for new issues, you are required to fix them. Warning: DeepScan doesn't always give you errors. Please look at CodeFactor warnings instead.CodeFactor
is a bot that checks for code quality. If you ever receive errors for new issues, you are required to fix them.Schema Validation
will scan your metadata.json
file for any errors (for e.g., missing fields, invalid value types, etc.). If you ever see any new issues, you are also required to fix those. Adding a schema field to your metadata.json
file will allow your text editor (if supported) to show you these errors during development.Additional Rules
D/dアニメストア
or G/Google
). Any other Unicode/non-Latin characters must be under the #
folder (for e.g., #/巴哈姆特
) and numbers under the 0-9
folder (for e.g., 0-9/4anime
).After meeting all of the guidelines with the proper reviews and checks, your presence will be merged with the store.
If you have some suggestions about our guidelines, you should contact us @ PreMiD's Discord server and we will check them!
Revision 3
of the guidelines was written and was contributed to by the following individuals:
Revision 2
of the guidelines was written and was contributed to by the following individuals:
Revision 1
was maintained by the following individuals: