UNPKG

discord-levels

Version:

A package that allows you to create a complete level system on your discord bot

321 lines 13.6 kB
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>discord-levels</title> <meta name="description" content="Documentation for discord-levels"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="assets/css/main.css"> <script async src="assets/js/search.js" id="search-script"></script> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="assets/js/search.json" data-base="."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="index.html" class="title">discord-levels</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-externals" checked /> <label class="tsd-widget" for="tsd-filter-externals">Externals</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <h1>Project discord-levels</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section "> <h3>Functions</h3> <ul class="tsd-index-list"> <li class="tsd-kind-function"><a href="modules.html#rankcard" class="tsd-kind-icon">Rankcard</a></li> <li class="tsd-kind-function"><a href="modules.html#addxp" class="tsd-kind-icon">addXP</a></li> <li class="tsd-kind-function"><a href="modules.html#fetch" class="tsd-kind-icon">fetch</a></li> <li class="tsd-kind-function"><a href="modules.html#leaderboard" class="tsd-kind-icon">leaderboard</a></li> <li class="tsd-kind-function"><a href="modules.html#removexp" class="tsd-kind-icon">removeXP</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Functions</h2> <section class="tsd-panel tsd-member tsd-kind-function"> <a name="rankcard" class="tsd-anchor"></a> <h3>Rankcard</h3> <ul class="tsd-signatures tsd-kind-function"> <li class="tsd-signature tsd-kind-icon">Rankcard<span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, userID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/Octavia0509/discord-levels/blob/d46ab2e/lib/index.ts#L127">index.ts:127</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Returns a rankcard</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>message: <span class="tsd-signature-type">any</span></h5> <div class="tsd-comment tsd-typography"> <p>Parameter of your event message</p> </div> </li> <li> <h5>userID: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>The ID of the user</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function"> <a name="addxp" class="tsd-anchor"></a> <h3>addXP</h3> <ul class="tsd-signatures tsd-kind-function"> <li class="tsd-signature tsd-kind-icon">addXP<span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, userID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, XP<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/Octavia0509/discord-levels/blob/d46ab2e/lib/index.ts#L12">index.ts:12</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Adds experience to the user</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>message: <span class="tsd-signature-type">any</span></h5> <div class="tsd-comment tsd-typography"> <p>Parameter of your event message</p> </div> </li> <li> <h5>userID: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>ID of the user</p> </div> </li> <li> <h5>XP: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>The experience that will be added</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function"> <a name="fetch" class="tsd-anchor"></a> <h3>fetch</h3> <ul class="tsd-signatures tsd-kind-function"> <li class="tsd-signature tsd-kind-icon">fetch<span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, userID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/Octavia0509/discord-levels/blob/d46ab2e/lib/index.ts#L51">index.ts:51</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Allows you to obtain a user&#39;s information</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>message: <span class="tsd-signature-type">any</span></h5> <div class="tsd-comment tsd-typography"> <p>Parameter of your event message</p> </div> </li> <li> <h5>userID: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>ID of the user</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function"> <a name="leaderboard" class="tsd-anchor"></a> <h3>leaderboard</h3> <ul class="tsd-signatures tsd-kind-function"> <li class="tsd-signature tsd-kind-icon">leaderboard<span class="tsd-signature-symbol">(</span>client<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/Octavia0509/discord-levels/blob/d46ab2e/lib/index.ts#L81">index.ts:81</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Returns a ranking of the experience in the server</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>client: <span class="tsd-signature-type">any</span></h5> <div class="tsd-comment tsd-typography"> <p>Discord.js Client</p> </div> </li> <li> <h5>message: <span class="tsd-signature-type">any</span></h5> <div class="tsd-comment tsd-typography"> <p>Parameter of your event message</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-function"> <a name="removexp" class="tsd-anchor"></a> <h3>removeXP</h3> <ul class="tsd-signatures tsd-kind-function"> <li class="tsd-signature tsd-kind-icon">removeXP<span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, userID<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, XP<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/Octavia0509/discord-levels/blob/d46ab2e/lib/index.ts#L32">index.ts:32</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Remove experience to the user</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>message: <span class="tsd-signature-type">any</span></h5> <div class="tsd-comment tsd-typography"> <p>Parameter of your event message</p> </div> </li> <li> <h5>userID: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>ID of the user</p> </div> </li> <li> <h5>XP: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p>The experience that will be removed</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4> </li> </ul> </section> </section> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="current "> <a href="modules.html">Exports</a> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> <li class=" tsd-kind-function"> <a href="modules.html#rankcard" class="tsd-kind-icon">Rankcard</a> </li> <li class=" tsd-kind-function"> <a href="modules.html#addxp" class="tsd-kind-icon">addXP</a> </li> <li class=" tsd-kind-function"> <a href="modules.html#fetch" class="tsd-kind-icon">fetch</a> </li> <li class=" tsd-kind-function"> <a href="modules.html#leaderboard" class="tsd-kind-icon">leaderboard</a> </li> <li class=" tsd-kind-function"> <a href="modules.html#removexp" class="tsd-kind-icon">removeXP</a> </li> </ul> </nav> </div> </div> </div> <footer class="with-border-bottom"> <div class="container"> <h2>Legend</h2> <div class="tsd-legend-group"> </div> </div> </footer> <div class="container tsd-generator"> <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p> </div> <div class="overlay"></div> <script src="assets/js/main.js"></script> </body> </html>