GithubHelp home page GithubHelp logo

rhygg / drpc Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 80 KB

๐Ÿ“ฆ A discord rich presence package in the cli!

License: MIT License

JavaScript 100.00%
rpc-application timestamp desktop drpc discord discord-rpc discord-status discord-presence cli

drpc's Introduction

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      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

drpc's People

Contributors

rhygg avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.