@kingsworld/plugin-cron 3.0.4-next.54e7395 → 3.0.4-next.cabfeeb

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
@@ -12,7 +12,7 @@
12
12
 
13
13
  ## Description
14
14
 
15
- This plugin adds support for cron tasks to the Sapphire framework. It uses the [cron](ttps://www.npmjs.com/package/@kingsworld/plugin-cron) package to create and manage cron tasks.
15
+ This plugin adds support for cron tasks to the Sapphire framework. It creates and manages cron tasks using the [croner](https://www.npmjs.com/package/croner) package.
16
16
 
17
17
  ## Features
18
18
 
@@ -25,7 +25,7 @@ This plugin adds support for cron tasks to the Sapphire framework. It uses the [
25
25
 
26
26
  - [`@sapphire/framework`](https://www.npmjs.com/package/@sapphire/framework)
27
27
 
28
- You can use the following command to install this package along with `cron`, or replace `npm install` with your package manager of choice.
28
+ You can use the following command to install this package or replace `npm install` with your package manager.
29
29
 
30
30
  ```sh
31
31
  npm install @kingsworld/plugin-cron @sapphire/framework
@@ -63,7 +63,7 @@ const options = {
63
63
 
64
64
  - The `disableSentry` option is used to disable Sentry's cron monitoring. By default, it is set to `false`, which means Sentry cron monitoring is enabled if the `@sentry/node` package is installed and configured. This makes using Sentry an opt-in feature - you first opt in by installing `@sentry/node`. The `disableSentry` option then allows you to opt out in specific situations. You can set this to `true` to disable cron monitoring, which can be useful during development or if you haven't provided a Sentry DSN. If you don't use Sentry at all (i.e., `@sentry/node` is not installed), this option has no effect and can be safely ignored.
65
65
 
66
- In order to use the cron tasks anywhere other than a piece (commands, arguments, preconditions, etc.), you must first import the `container` property of `@sapphire/framework`. From there, you can access the store.
66
+ To use the cron tasks anywhere other than a piece (commands, arguments, preconditions, etc.), you must first import the `container` property of `@sapphire/framework`. From there, you can access the store.
67
67
 
68
68
  This is a simple example of how to pause and resume a task from a service.
69
69
 
@@ -99,7 +99,7 @@ export class MyAwesomeService {
99
99
  }
100
100
  ```
101
101
 
102
- It's important to note that the `startAll()` method is called automatically when the client is ready. Therefore, it's generally not necessary to call this method manually, unless you have a specific need to restart all cron tasks at some point after the client has been initialized.
102
+ It's important to note that the `startAll()` method is called automatically when the client is ready. Therefore, it's generally not necessary to call this method manually unless you have a specific need to restart all cron tasks at some point after the client has been initialized.
103
103
 
104
104
  ### Create a task handler
105
105
 
@@ -6,7 +6,7 @@ var CronTaskStore_cjs = require('./lib/structures/CronTaskStore.cjs');
6
6
  var CronTaskTypes_cjs = require('./lib/types/CronTaskTypes.cjs');
7
7
 
8
8
  // src/index.ts
9
- var version = "3.0.4-next.54e7395";
9
+ var version = "3.0.4-next.cabfeeb";
10
10
 
11
11
  exports.version = version;
12
12
  Object.keys(CronTaskHandler_cjs).forEach(function (k) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;AA+BO,IAAM,OAAkB,GAAA","file":"index.cjs","sourcesContent":["import type { CronTaskStore } from './lib/structures/CronTaskStore';\nimport type { CronTaskHandler } from './lib/CronTaskHandler';\nimport type { CronTaskHandlerOptions } from './lib/types/CronTaskTypes';\n\nexport * from './lib/CronTaskHandler';\nexport * from './lib/structures/CronTask';\nexport * from './lib/structures/CronTaskStore';\nexport * from './lib/types/CronTaskTypes';\n\ndeclare module '@sapphire/pieces' {\n\tinterface Container {\n\t\tcronTasks: CronTaskHandler;\n\t}\n\n\tinterface StoreRegistryEntries {\n\t\t'cron-tasks': CronTaskStore;\n\t}\n}\n\ndeclare module 'discord.js' {\n\texport interface ClientOptions {\n\t\tcronTasks?: Partial<CronTaskHandlerOptions>;\n\t}\n}\n\n/**\n * The [@kingsworld/plugin-cron](https://github.com/Kings-World/sapphire-plugins/tree/main/packages/cron) version that you are currently using.\n * An example use of this is showing it of in a bot information command.\n *\n * Note to Sapphire developers: This needs to explicitly be `string` so it is not typed as the string that gets replaced by esbuild\n */\nexport const version: string = '3.0.4-next.54e7395';\n"]}
1
+ {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;AA+BO,IAAM,OAAkB,GAAA","file":"index.cjs","sourcesContent":["import type { CronTaskStore } from './lib/structures/CronTaskStore';\nimport type { CronTaskHandler } from './lib/CronTaskHandler';\nimport type { CronTaskHandlerOptions } from './lib/types/CronTaskTypes';\n\nexport * from './lib/CronTaskHandler';\nexport * from './lib/structures/CronTask';\nexport * from './lib/structures/CronTaskStore';\nexport * from './lib/types/CronTaskTypes';\n\ndeclare module '@sapphire/pieces' {\n\tinterface Container {\n\t\tcronTasks: CronTaskHandler;\n\t}\n\n\tinterface StoreRegistryEntries {\n\t\t'cron-tasks': CronTaskStore;\n\t}\n}\n\ndeclare module 'discord.js' {\n\texport interface ClientOptions {\n\t\tcronTasks?: Partial<CronTaskHandlerOptions>;\n\t}\n}\n\n/**\n * The [@kingsworld/plugin-cron](https://github.com/Kings-World/sapphire-plugins/tree/main/packages/cron) version that you are currently using.\n * An example use of this is showing it of in a bot information command.\n *\n * Note to Sapphire developers: This needs to explicitly be `string` so it is not typed as the string that gets replaced by esbuild\n */\nexport const version: string = '3.0.4-next.cabfeeb';\n"]}
@@ -4,7 +4,7 @@ export * from './lib/structures/CronTask.mjs';
4
4
  export * from './lib/structures/CronTaskStore.mjs';
5
5
  export * from './lib/types/CronTaskTypes.mjs';
6
6
 
7
- var version = "3.0.4-next.54e7395";
7
+ var version = "3.0.4-next.cabfeeb";
8
8
 
9
9
  export { version };
10
10
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AA+BO,IAAM,OAAkB,GAAA","file":"index.mjs","sourcesContent":["import type { CronTaskStore } from './lib/structures/CronTaskStore';\nimport type { CronTaskHandler } from './lib/CronTaskHandler';\nimport type { CronTaskHandlerOptions } from './lib/types/CronTaskTypes';\n\nexport * from './lib/CronTaskHandler';\nexport * from './lib/structures/CronTask';\nexport * from './lib/structures/CronTaskStore';\nexport * from './lib/types/CronTaskTypes';\n\ndeclare module '@sapphire/pieces' {\n\tinterface Container {\n\t\tcronTasks: CronTaskHandler;\n\t}\n\n\tinterface StoreRegistryEntries {\n\t\t'cron-tasks': CronTaskStore;\n\t}\n}\n\ndeclare module 'discord.js' {\n\texport interface ClientOptions {\n\t\tcronTasks?: Partial<CronTaskHandlerOptions>;\n\t}\n}\n\n/**\n * The [@kingsworld/plugin-cron](https://github.com/Kings-World/sapphire-plugins/tree/main/packages/cron) version that you are currently using.\n * An example use of this is showing it of in a bot information command.\n *\n * Note to Sapphire developers: This needs to explicitly be `string` so it is not typed as the string that gets replaced by esbuild\n */\nexport const version: string = '3.0.4-next.54e7395';\n"]}
1
+ {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AA+BO,IAAM,OAAkB,GAAA","file":"index.mjs","sourcesContent":["import type { CronTaskStore } from './lib/structures/CronTaskStore';\nimport type { CronTaskHandler } from './lib/CronTaskHandler';\nimport type { CronTaskHandlerOptions } from './lib/types/CronTaskTypes';\n\nexport * from './lib/CronTaskHandler';\nexport * from './lib/structures/CronTask';\nexport * from './lib/structures/CronTaskStore';\nexport * from './lib/types/CronTaskTypes';\n\ndeclare module '@sapphire/pieces' {\n\tinterface Container {\n\t\tcronTasks: CronTaskHandler;\n\t}\n\n\tinterface StoreRegistryEntries {\n\t\t'cron-tasks': CronTaskStore;\n\t}\n}\n\ndeclare module 'discord.js' {\n\texport interface ClientOptions {\n\t\tcronTasks?: Partial<CronTaskHandlerOptions>;\n\t}\n}\n\n/**\n * The [@kingsworld/plugin-cron](https://github.com/Kings-World/sapphire-plugins/tree/main/packages/cron) version that you are currently using.\n * An example use of this is showing it of in a bot information command.\n *\n * Note to Sapphire developers: This needs to explicitly be `string` so it is not typed as the string that gets replaced by esbuild\n */\nexport const version: string = '3.0.4-next.cabfeeb';\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kingsworld/plugin-cron",
3
- "description": "A simple @sapphire/framework plugin that aims to make use of the cron package and allow users to make cron jobs within their Sapphire discord bot.",
4
- "version": "3.0.4-next.54e7395",
3
+ "description": "A simple @sapphire/framework plugin that aims to make use of the croner package and allow users to make cron jobs within their Sapphire discord bot.",
4
+ "version": "3.0.4-next.cabfeeb",
5
5
  "author": "Seren_Modz 21 <seren@kings-world.net>",
6
6
  "license": "MIT",
7
7
  "main": "dist/cjs/index.cjs",
@@ -68,6 +68,7 @@
68
68
  "sapphire",
69
69
  "plugin",
70
70
  "cron",
71
+ "croner",
71
72
  "typescript",
72
73
  "ts",
73
74
  "discord",