argus-discord-analytics 0.2.0 → 0.2.1
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/dist/index.d.mts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +3 -4
- package/dist/index.mjs +3 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* argus.trackRevenue({ source: 'patreon', amount: 500, tier: 'Premium' });
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
declare const SDK_VERSION = "0.2.
|
|
24
|
+
declare const SDK_VERSION = "0.2.1";
|
|
25
25
|
interface ArgusConfig {
|
|
26
26
|
/** Your Argus API key (starts with arg_live_ or arg_test_) */
|
|
27
27
|
apiKey: string;
|
|
@@ -131,7 +131,15 @@ declare class Argus {
|
|
|
131
131
|
* });
|
|
132
132
|
* ```
|
|
133
133
|
*/
|
|
134
|
-
trackCommand(commandOrInteraction: string |
|
|
134
|
+
trackCommand(commandOrInteraction: string | {
|
|
135
|
+
commandName?: string;
|
|
136
|
+
customId?: string;
|
|
137
|
+
guildId?: string | null;
|
|
138
|
+
user?: {
|
|
139
|
+
id: string;
|
|
140
|
+
};
|
|
141
|
+
options?: unknown;
|
|
142
|
+
}, options?: {
|
|
135
143
|
serverId?: string;
|
|
136
144
|
userId?: string;
|
|
137
145
|
metadata?: Record<string, unknown>;
|
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* argus.trackRevenue({ source: 'patreon', amount: 500, tier: 'Premium' });
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
declare const SDK_VERSION = "0.2.
|
|
24
|
+
declare const SDK_VERSION = "0.2.1";
|
|
25
25
|
interface ArgusConfig {
|
|
26
26
|
/** Your Argus API key (starts with arg_live_ or arg_test_) */
|
|
27
27
|
apiKey: string;
|
|
@@ -131,7 +131,15 @@ declare class Argus {
|
|
|
131
131
|
* });
|
|
132
132
|
* ```
|
|
133
133
|
*/
|
|
134
|
-
trackCommand(commandOrInteraction: string |
|
|
134
|
+
trackCommand(commandOrInteraction: string | {
|
|
135
|
+
commandName?: string;
|
|
136
|
+
customId?: string;
|
|
137
|
+
guildId?: string | null;
|
|
138
|
+
user?: {
|
|
139
|
+
id: string;
|
|
140
|
+
};
|
|
141
|
+
options?: unknown;
|
|
142
|
+
}, options?: {
|
|
135
143
|
serverId?: string;
|
|
136
144
|
userId?: string;
|
|
137
145
|
metadata?: Record<string, unknown>;
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ __export(index_exports, {
|
|
|
25
25
|
default: () => index_default
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(index_exports);
|
|
28
|
-
var SDK_VERSION = "0.2.
|
|
28
|
+
var SDK_VERSION = "0.2.1";
|
|
29
29
|
function hashString(str) {
|
|
30
30
|
let hash = 0;
|
|
31
31
|
for (let i = 0; i < str.length; i++) {
|
|
@@ -155,10 +155,9 @@ var Argus = class {
|
|
|
155
155
|
} else {
|
|
156
156
|
commandName = extractFullCommandName(commandOrInteraction);
|
|
157
157
|
if (!extractedOptions) {
|
|
158
|
-
const interaction = commandOrInteraction;
|
|
159
158
|
extractedOptions = {
|
|
160
|
-
serverId:
|
|
161
|
-
userId:
|
|
159
|
+
serverId: commandOrInteraction.guildId || void 0,
|
|
160
|
+
userId: commandOrInteraction.user?.id
|
|
162
161
|
};
|
|
163
162
|
}
|
|
164
163
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
var SDK_VERSION = "0.2.
|
|
2
|
+
var SDK_VERSION = "0.2.1";
|
|
3
3
|
function hashString(str) {
|
|
4
4
|
let hash = 0;
|
|
5
5
|
for (let i = 0; i < str.length; i++) {
|
|
@@ -129,10 +129,9 @@ var Argus = class {
|
|
|
129
129
|
} else {
|
|
130
130
|
commandName = extractFullCommandName(commandOrInteraction);
|
|
131
131
|
if (!extractedOptions) {
|
|
132
|
-
const interaction = commandOrInteraction;
|
|
133
132
|
extractedOptions = {
|
|
134
|
-
serverId:
|
|
135
|
-
userId:
|
|
133
|
+
serverId: commandOrInteraction.guildId || void 0,
|
|
134
|
+
userId: commandOrInteraction.user?.id
|
|
136
135
|
};
|
|
137
136
|
}
|
|
138
137
|
}
|
package/package.json
CHANGED