rhygg / drpc

πŸ“¦ A discord rich presence package in the cli!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DRPC

 ________  ________  ________  ________          ________  ___       ___     
|\   ___ \|\   __  \|\   __  \|\   ____\        |\   ____\|\  \     |\  \    
\ \  \_|\ \ \  \|\  \ \  \|\  \ \  \___|        \ \  \___|\ \  \    \ \  \   
 \ \  \ \\ \ \   _  _\ \   ____\ \  \            \ \  \    \ \  \    \ \  \  
  \ \  \_\\ \ \  \\  \\ \  \___|\ \  \____        \ \  \____\ \  \____\ \  \ 
   \ \_______\ \__\\ _\\ \__\    \ \_______\       \ \_______\ \_______\ \__\
    \|_______|\|__|\|__|\|__|     \|_______|        \|_______|\|_______|\|__|

Drpc is a robust discord rich precence client on the command line, you can save a preset, delete it and configure it, easily!

Installation

npm install -g drpc-cli

Documentation

To configure a preset you must create a drpc-settings.json file, in the current working directory i.e., the directory you are currently working on it. For example: if you create a drpc-settings.json file on the Desktop, the cli must run in the desktop folder.

Here's a example settings file,

{
    "client_id":"",
    "large_image_key":"",
    "large_image_text":"",
    "small_image_key":"",
    "small_image_text":"",
    "description":"",
    "state":"",
    "show_timestamp": ,
    "buttons":[
        {"label":"", "url":""},
        {"label":"", "url":""}
    ]
}

The following is a full template, fill all the information correctly to yield the result!

API

client_id

The client id of the rpc application.

required: true

large_image_key

The key(name) of the large image as set in the rpc application.

required: true

large_image_text The text that would show off when a user hovers over the image. required: false

small_image_key

The key(name) of the small image as set in the rpc application.

required: false

small_image_text

The text that would show off when a user hovers over the image.

required: false

description

The rpc description.

required: true

state

The rpc state description.

required: false

show_timestamp

(Bool) if you want to show the timestamp.

required: false

buttons

(Array) Buttons on the Rich Presence.

Array takes: two objects

Example Object:

{"label":"Something", "url":"https://something.com"},
{"label":"anothersomething","url":"https://example.com"}

Min buttons: 1, Max buttons: 2, required: false

CLI

    DRPC CLI
----------------------------------------------------
MAIN COMMANDS
-------------
--help | -h  --- Shows you the following menu

--run  --- Starts a process.

--delete | -del --- delete a configuration. (required args -> <name>)

--list | -l --- Check the list of saved presets.

SUB-COMMANDS 
------------
RUN
------
--save    --- Run a configuration while simultaneously saving it. (required args -> <name>)
--preset  --- Run a preset instead of a configuration file in the current working dir.

FAQs

How to save a rpc preset?

drpc --run --save <name>

Must the rpc config file be in the cwd while saving the preset? Yes.

If you're going to save the preset you want to run using:

drpc --run --save <name>

The configuration you want to run and save must be in the same current working directory.

Example

drpc --list
β”Œβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ No.  β”‚ Name                β”‚ ClientID                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1    β”‚ node.json           β”‚ 781004595546816522      β”‚
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
drpc --help


    DRPC CLI
----------------------------------------------------
MAIN COMMANDS
-------------
--help | -h  --- Shows you the following menu
--run  --- Starts a process.
--delete | -del --- delete a configuration. (required args -> <name>)
--list | -l --- Check the list of saved presets.
SUB-COMMANDS 
------------
RUN
------
--save    --- Run a configuration while simultaneously saving it. (required args -> <name>)
--preset  --- Run a preset instead of a configuration file in the current working dir.
drpc --run --save example
 ________  ________  ________  ________          ________  ___       ___     
|\   ___ \|\   __  \|\   __  \|\   ____\        |\   ____\|\  \     |\  \    
\ \  \_|\ \ \  \|\  \ \  \|\  \ \  \___|        \ \  \___|\ \  \    \ \  \   
 \ \  \ \\ \ \   _  _\ \   ____\ \  \            \ \  \    \ \  \    \ \  \  
  \ \  \_\\ \ \  \\  \\ \  \___|\ \  \____        \ \  \____\ \  \____\ \  \ 
   \ \_______\ \__\\ _\\ \__\    \ \_______\       \ \_______\ \_______\ \__\
    \|_______|\|__|\|__|\|__|     \|_______|        \|_______|\|_______|\|__|
                                                                             
                                                                             
                                                                             
Client has sucessfully Started! 
 Like this project? Please consider starring it On on github! (​https://github.com/rhydderchc/drpc​)
Data has been saved with the preset name example
drpc --list
β”Œβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ No.  β”‚ Name                β”‚ ClientID                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1    β”‚ example.json        β”‚ 781004595546816522      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 2    β”‚ node.json           β”‚ 781004595546816523      β”‚
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
drpc --delete example
βœ” The preset example has been deleted sucessfully!
drpc --list
β”Œβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ No.  β”‚ Name                β”‚ ClientID                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1    β”‚ node.json           β”‚ 781004595546816522      β”‚
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

About

πŸ“¦ A discord rich presence package in the cli!

License:MIT License


Languages

Language:JavaScript 100.0%