simply-xp 1.1.3 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,9 +1,10 @@
1
- <p align="center"><img align="center" style="margin-bottom:-6px" src="https://i.imgur.com/BiaHJA7.png?maxwidth=128&fidelity=grand"></p>
1
+ <p align="center"><img align="center" style="width: 128px" src="https://user-images.githubusercontent.com/71836991/173240203-ca92976f-2e5e-4a85-ba5e-155796eac889.png"></p>
2
2
 
3
3
  <h2 style="font-size:2.5rem;" align="center">Simply-XP</h2>
4
4
 
5
5
  <h2 align="center">A Simple, Easy and Beginner friendly XP System. <br>Uses Discord.js v13<br><br>Developed by Rahuletto#0243</h2>
6
6
 
7
+
7
8
  <br>
8
9
  <p align="center">
9
10
  <a href="https://www.npmjs.com/package/simply-xp"><img src="https://img.shields.io/npm/v/simply-xp.svg?style=flat-square" /></a>
@@ -28,48 +29,33 @@ yarn add simply-xp
28
29
 
29
30
  <br>
30
31
 
31
- # 🎉 What's New 🎉
32
-
33
- - Fixed create()
34
- - New `charts`
35
- - addXP redefined ! and now fires levelUp event [Most awaited]
36
- - New Examples
37
- - New Typings for levelUp
38
- - rankCard fix and more customizations !
39
- - leaderboard is much cooler.
40
- - Bug Fixes
41
-
42
- # But Why ?
32
+ # 👋 Goodbye XP 👋
43
33
 
44
- - Easiest XP System in Discord.js
45
- - Fastest Support ever
46
- - Rank Card Maker
47
- - Beginner Friendly
48
- - Easier than other XP Systems
49
- - Inbuilt Auto Roles system
50
34
 
51
- `Inspired by discord-xp`
35
+ > We are deprecating, Because making an XP system is already easy. And working on a package which not much people uses is an time waste. We are not deleting the package whatsoever !
52
36
 
53
- # 🖥 Functions 🖥
37
+ # 👋 Last Update log
54
38
 
55
- ```js
56
- let xp = require('simply-xp')
57
- ```
39
+ - Fixed bugs
40
+ - New `addLevel(), setLevel(), reset()`
41
+ - roleSetup redefined.. Redid whole system.
42
+ - New everything.. Everything is now tidy and compact.
43
+ - levelUp event returns role id too !
44
+ - Re-coded to squeeze bugs
45
+ - Bug Fixes
58
46
 
59
- - [connect()](https://github.com/Rahuletto/simply-xp/blob/main/Examples/connect.md)
60
- - [create()](https://github.com/Rahuletto/simply-xp/blob/main/Examples/create.md)
61
- - [addXP()](https://github.com/Rahuletto/simply-xp/blob/main/Examples/addXP.md)
62
- - [setXP()](https://github.com/Rahuletto/simply-xp/blob/main/Examples/setXP.md)
63
- - [rank()](https://github.com/Rahuletto/simply-xp/blob/main/Examples/rank.md)
64
- - [fetch()](https://github.com/Rahuletto/simply-xp/blob/main/Examples/fetch.md)
65
- - [leaderboard()](https://github.com/Rahuletto/simply-xp/blob/main/Examples/charts.md)
66
- - [charts()](https://github.com/Rahuletto/simply-xp/blob/main/Examples/leaderboard.md)
67
- - [lvlRole()](https://github.com/Rahuletto/simply-xp/blob/main/Examples/lvlRole.md) | Requires: [roleSetup()](https://github.com/Rahuletto/simply-xp/blob/main/Examples/roleSetup.md)
68
- - [roleSetup()](https://github.com/Rahuletto/simply-xp/blob/main/Examples/roleSetup.md) | Requires: [lvlRole()](https://github.com/Rahuletto/simply-xp/blob/main/Examples/lvlRole.md)
47
+ # ~~But Why ?~~
48
+ ## We do not recommend using this package as you can encounter bugs.
69
49
 
70
- Overwhelmed by these functions ?? Got ya covered !
50
+ - ~~Easiest XP System in Discord.js~~
51
+ - ~~Fastest Support ever~~
52
+ - ~~Rank Card Maker~~
53
+ - ~~Beginner Friendly~~
54
+ - ~~Easier than other XP Systems~~
55
+ - ~~Inbuilt Auto Roles system~~
56
+ - ~~Flexible and simple at the same time~~
71
57
 
72
- - [Introduction](https://github.com/Rahuletto/simply-xp/blob/main/Examples/intro.md)
58
+ `Reconstructed discord-xp to give you things simpler ;)`
73
59
 
74
60
  <br>
75
61
 
package/index.d.ts CHANGED
@@ -1,15 +1,30 @@
1
- import { Message } from 'discord.js'
1
+ import { Message, Client } from 'discord.js'
2
2
 
3
3
  type HexColorString = `#${string}` | string
4
4
 
5
5
  export type connectOptions = {
6
6
  notify?: boolean
7
7
  }
8
+
8
9
  export declare function connect(
9
10
  db: string,
10
11
  options?: connectOptions
11
12
  ): Promise<any>
12
13
 
14
+ export declare function addLevel(
15
+ message: Message,
16
+ userID: string,
17
+ guildID: string,
18
+ level: number
19
+ ): Promise<any>
20
+
21
+ export declare function addXP(
22
+ message: Message,
23
+ userID: string,
24
+ guildID: string,
25
+ xp: number
26
+ ): Promise<any>
27
+
13
28
  export type chartsOptions = {
14
29
  position?: string
15
30
  background?: HexColorString
@@ -21,6 +36,22 @@ export declare function charts(
21
36
  options?: chartsOptions
22
37
  ): Promise<any>
23
38
 
39
+ export declare function create(userID: string, guildID: string): Promise<any>
40
+
41
+ export declare function fetch(userID: string, guildID: string): Promise<any>
42
+
43
+ export declare function leaderboard(
44
+ userID: string,
45
+ guildID: string,
46
+ limit: number
47
+ ): Promise<any>
48
+
49
+ export declare function lvlRole(
50
+ message: Message,
51
+ userID: string,
52
+ guildID: string
53
+ ): Promise<any>
54
+
24
55
  export type rankOptions = {
25
56
  slash?: boolean
26
57
  background?: string
@@ -33,6 +64,8 @@ export declare function rank(
33
64
  options?: rankOptions
34
65
  ): Promise<any>
35
66
 
67
+ export declare function reset(userID: string, guildID: string): Promise<any>
68
+
36
69
  export type lvladdOptions = {
37
70
  level: string
38
71
  role: string
@@ -41,6 +74,19 @@ export type lvlremoveOptions = {
41
74
  level: string
42
75
  }
43
76
 
77
+ export declare function setLevel(
78
+ message: Message,
79
+ userID: string,
80
+ guildID: string,
81
+ level: number
82
+ ): Promise<any>
83
+
84
+ export declare function setXP(
85
+ userID: string,
86
+ guildID: string,
87
+ xp: number
88
+ ): Promise<any>
89
+
44
90
  /** For levelUp event */
45
91
  export type Data = {
46
92
  xp: string
@@ -49,8 +95,13 @@ export type Data = {
49
95
  guildID: string
50
96
  }
51
97
 
98
+ export type Role = {
99
+ lvl: string
100
+ role: string
101
+ }
102
+
52
103
  declare module 'discord.js' {
53
104
  export interface ClientEvents {
54
- levelUp: [Message, Data]
105
+ levelUp: [Message, Data, Role]
55
106
  }
56
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simply-xp",
3
- "version": "1.1.3",
3
+ "version": "1.1.6",
4
4
  "description": "A Simple, Easy and Beginner Friendly XP System",
5
5
  "main": "simplyxp.js",
6
6
  "typings": "index.d.ts",