xernerx 4.10.0 → 4.11.0

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.
@@ -1,10 +1,12 @@
1
1
  /** @format */
2
+ import { ActivityType } from 'discord.js';
3
+ import { Style } from 'dumfunctions';
2
4
  export default function setPresence(client, options) {
3
5
  const presence = () => client.user?.setPresence({
4
6
  activities: [
5
7
  {
6
8
  name: options.text,
7
- type: options.type,
9
+ type: ActivityType[Style.titleCase(options.type || 'Custom')],
8
10
  url: options.url,
9
11
  },
10
12
  ],
@@ -233,7 +233,7 @@ export interface XernerxInhibitorOptions {
233
233
  }
234
234
  export interface PresenceOptions {
235
235
  text: string;
236
- type?: ActivityType.Playing | ActivityType.Streaming | ActivityType.Listening | ActivityType.Watching | ActivityType.Competing;
236
+ type?: keyof typeof ActivityType;
237
237
  url: string;
238
238
  status?: PresenceStatusData;
239
239
  interval?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xernerx",
3
- "version": "4.10.0",
3
+ "version": "4.11.0",
4
4
  "description": "A bot framework for discord.js.",
5
5
  "main": "dist/main.js",
6
6
  "type": "module",
@@ -44,7 +44,7 @@
44
44
  "discord.js": "^14.14.1",
45
45
  "dumfunctions": "2.1.2",
46
46
  "xernerx-extension-builder": "0.0.16",
47
- "zod": "3.22.2"
47
+ "zod": "^3.22.4"
48
48
  },
49
49
  "devDependencies": {
50
50
  "prettier": "3.0.0",