-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrote brought better styling, a nicer class system for the developer. Oh did i mention i removed the shitty api? Might add that back but it will work then. Removed useless files such as *.bat's. README looks nice. main file isn't a clusterfuck... uh oh i removed some other cancerous files. Yea the app needed this.
- Loading branch information
Showing
13 changed files
with
307 additions
and
641 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Ignore config(s) | ||
|
||
config.json | ||
config.js | ||
|
||
# Ignore node modules | ||
|
||
node_modules/ | ||
|
||
# Ignore lock files | ||
|
||
yarn.lock | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,51 @@ | ||
# jsLiam | ||
# jsLiam 2.0 | ||
|
||
A simple rich presence i made for the people of the dyno server. Repurpose it if you wish. | ||
jsLiam is a discord rich presence application that is very lightweight. | ||
|
||
I built this rich presence app to be customizable and lightweight at the same time, by making it so you can just use the terminal and notepad to edit it | ||
|
||
- Name and release format thought of by `Mika K.` | ||
jsLiam 2.0 is handled by its own special client that works as a compatability layer between discord-rpc and the developer. | ||
|
||
## Required things | ||
# Config | ||
|
||
- NodeJS 8.0.0+ | ||
- A text editor that can handle JSON files (if you want to set it up differently), notepad will work just fine. | ||
- Terminal access | ||
You can use either js or json for configs now. Yay! | ||
|
||
## Getting started | ||
**If it is in <code>[]</code> it is optional** | ||
|
||
- First install all dependencies (one) by running `npm install` (in the applications directory) in the terminal or by running the `install.bat` file (windows) | ||
| Param | Type(s) | Description | ||
|
||
- Then check if it works by doing `npm start` (in the applications directory) in the terminal or by running the `start.bat` file (windows) | ||
[config.largeImageKey] | <code>Array</code> | <code>String</code> | The presence largeImageKey | ||
[config.largeImageText] | <code>Array</code> | <code>String</code> | The presence largeImageText | ||
[config.lsmallImageKey] | <code>Array</code> | <code>String</code> | The presence smallImageKey | ||
[config.smallImageText] | <code>Array</code> | <code>String</code> | The presence smallImageText | ||
[config.state] | <code>Array</code> | <code>String</code> | The presences state. | ||
[config.details] | <code>Array</code> | <code>String</code> | The presence details | ||
[config.timestamp] | <code>Boolean</code> | <code>String</code> | <code>False</code> | Whether or not to have a timestamp. "now" will reset the timestamp. | ||
[config.partySize] | <code>Number</code> | The party size. Max: 1000. | ||
[config.partyMax] | <code>Number</code> | The maximum party size. Max: 100 | ||
[config.noUpdate] <code>Boolean</code> | Whether or not to update the config. | ||
config.clientId | <code>String</code> | The client ID for the app you will be using with the presence. | ||
|
||
- You can configure it by using a file named `config.json` in the root of the application. | ||
# How strict is jsLiam? | ||
|
||
## A warning for if you use pm2 | ||
This new version is fairly strict compared to the old one. You can take a look at most of the code in [src/structures/PresenceClient.js](./src/structures/PresenceClient.js). | ||
|
||
Know what pm2 does, and how to use it if you want to use pm2. If you are using pm2 you should know how to reload the application, start the application, stop the application, and view the logs for the application | ||
# Example configs | ||
|
||
## Features | ||
You can view a JS and a JSON example config under [example.config.json](./example.config.json) (json) or [example.config.js](./example.config.js) (JS) | ||
|
||
- A hot reloadable configuration file. If you want to reload the configuration file, just type `refresh` into your terminal (unless of course you are using pm2) | ||
# Setup | ||
|
||
- Easy configuration. The configuration keys are below, and are easy to understand (most of the time). | ||
Requiremennts | ||
|
||
- Everything is able to be disabled. | ||
- Nodejs (8+) | ||
- NPM/YARN | ||
- Discord | ||
- Internet access | ||
|
||
## Configuration keys | ||
# Notes | ||
|
||
`clientId` - (optional) The clientId of the discord developers application you want to use (Can be changed once app is running by saying `refreshclient` to the terminal) | ||
jsLiam NO LONGER comes pre setup. You have to build your own app. Kthx bai. Might change my mind on this. | ||
|
||
`staticQuote` - (optional) Makes the quote static, but the quote needs to be a string. If the quote is not a string, it will error out. Allowed values: `'true'` - Makes the quote static. Example: `"staticQuote": "true"` | ||
# Copyright | ||
|
||
`timestamp` - (optional) Whether or not you want a beginning timestamp. Allowed values: `true`, or `"true"` - Makes sure the timestamp is on. `"now"` - Resets the timestamp to the current date when you refresh, rewrites your config and makes a backup called "oldConfig.json" Default: `true` | ||
|
||
`defaultQuotes` - (optional) Whether or not you want the default quotes on. Allowed values: `'false'` - Disables the default quotes. Default: `true` | ||
|
||
`quotes` - (optional) Additional quotes (unless `defaultQuotes` is `'false'`). Can be a single quote if `"staticQuote"` is `'true'` Example: `[ "Making a personal bot", "Making a private bot" ]`, `"Making a bot"` | ||
|
||
`largeImageKey` - (optional) The large image of the presence. Example: `"largeImageKey": "code"`, `"largeImageKey": "[ "code", "bot" ]"`, `"largeImageKey": "disable"`. Default: `"jsLiam"` | ||
|
||
`largeImageText` - (optional) The large images text. Example: `"largeImageText": "Coding a bot with eris (library)"`. Default: `null`/Does not exist | ||
|
||
`smallImageKey` - (optional) The small image of the presence. Will not work if no large image! Example: `"smallImageKey": "js"`, `"smallImageKey": "[ "js", "vsc" ]"`. Default: `null`/Does not exist | ||
|
||
`smallImageText` - (optional) The small images text. Example: `"smallImageText": "JavaScript"`. Default: `null`/Does not exist | ||
|
||
`state` - (optional) A static state, must be a string. Example: `"state": "Step"`. Default: `null`/Does not exist | ||
|
||
`maxPartySize` - (optional) The max party size (idk what you would use it for). Needs to be a **string** **Cannot be more then 100**. Requires: `state`. Example: `"maxPartySize": "3"` | ||
|
||
`partySize` - (optional) The current party size. Needs to be a **string**. **Cannot be more then maxPartySize, or 100!** Requires: `state`, `maxPartySize`. Example: `"partySize": "1"` | ||
|
||
## Want to get rid of the small or large image? | ||
|
||
- To disable the largeImageKey you have to do `"largeImageKey": "disable"`. | ||
|
||
- To disable to the smallImageKey, you just delete `"smallImageKey"` | ||
|
||
### There is a example configuration file called `example.config.json`. | ||
|
||
If you are going to set something as `false`, `undefined`, `0`, or `null`, just remove the key. It is useless then anyways. | ||
|
||
- There is `altExample.config.json` to show a example of a alternate configuration | ||
|
||
## If you want your own application that you control | ||
|
||
- Go to [the Discord Developer Dashboard](https://discordapp.com/developers/applications/me) | ||
- Create a new application | ||
- Add some art assets under `Rich Presence` > `Art Assets` (you can have 150, and they must be atleast 512x512) | ||
- Get the applications clientId | ||
- Enter it (the clientID) into the config.json file | ||
- Go ham with customization | ||
|
||
Notice! Your application name will be your rich presence's name! | ||
Copyright VoidNulll 2018-2019 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
clientId: 'client ID Here', | ||
timestamp: true, | ||
state: 'JS master race', | ||
largeImageKey: 'null', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"clientId": "513462902053797903", | ||
"timestamp": "false", | ||
"quotes": [ "Posting random stuff", "Pong!" ], | ||
"largeImageKey": "dynoglitch", | ||
"largeImageText": "Dyno server icon", | ||
"state": "Ping!" | ||
"clientId": "Client ID here", | ||
"timestamp": true, | ||
"state": "I am Null", | ||
"details": ["Easy rewrite", "Weee", "Fuck Circular objects"], | ||
"largeImageKey": "null", | ||
"largeImageText": "Whats this?" | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
6cc9a3e
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.
Yes i know.. forcing updates is bad...
I don't care, it needed to be forced and i really do not care about what it was like before.