@sapphire/plugin-scheduled-tasks 10.0.2-next.f5fa1f7 → 10.0.2-next.f8b2f60

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
@@ -73,7 +73,8 @@ import { container } from '@sapphire/framework';
73
73
 
74
74
  export class MyAwesomeService {
75
75
  public createAwesomeTask() {
76
- container.tasks.create('name', { id: '123' }, 2000);
76
+ const payload = { awesome: true };
77
+ container.tasks.create({ name: 'awesome', payload }, 2000);
77
78
  }
78
79
  }
79
80
  ```
@@ -95,7 +96,8 @@ export class MuteCommand extends Command {
95
96
 
96
97
  public async run(message: Message) {
97
98
  // create a task to unmute the user in 1 minute
98
- this.container.tasks.create('unmute', { authorId: message.author.id }, 60_000);
99
+ const payload = { authorId: message.author.id };
100
+ this.container.tasks.create({ name: 'unmute', payload }, 60_000);
99
101
  }
100
102
  }
101
103
  ```
@@ -131,14 +133,15 @@ declare module '@sapphire/plugin-scheduled-tasks' {
131
133
  ##### Using Manual Tasks
132
134
 
133
135
  ```typescript
134
- container.tasks.create('manual', payload, 5000);
136
+ const payload = { awesome: true };
137
+ container.tasks.create({ name: 'manual', payload }, 5000);
135
138
  ```
136
139
 
137
140
  #### Pattern Task Example
138
141
 
139
142
  Pattern jobs are currently only supported by the Redis strategy.
140
143
 
141
- ##### Creating the Piece:
144
+ ##### Creating the Piece
142
145
 
143
146
  ```typescript
144
147
  import { ScheduledTask } from '@sapphire/plugin-scheduled-tasks';
@@ -7,7 +7,7 @@ var ScheduledTaskEvents_cjs = require('./lib/types/ScheduledTaskEvents.cjs');
7
7
  var _load_cjs = require('./listeners/_load.cjs');
8
8
 
9
9
  // src/index.ts
10
- var version = "10.0.2-next.f5fa1f7";
10
+ var version = "10.0.2-next.f8b2f60";
11
11
 
12
12
  Object.defineProperty(exports, "loadListeners", {
13
13
  enumerable: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAwCO,IAAM,OAAkB,GAAA","file":"index.cjs","sourcesContent":["import type { ScheduledTaskHandler } from './lib/ScheduledTaskHandler';\nimport type { ScheduledTaskStore } from './lib/structures/ScheduledTaskStore';\nimport type { ScheduledTaskHandlerOptions } from './lib/types/ScheduledTaskTypes';\n\nexport * from './lib/ScheduledTaskHandler';\nexport * from './lib/structures/ScheduledTask';\nexport * from './lib/structures/ScheduledTaskStore';\nexport * from './lib/types/ScheduledTaskEvents';\nexport type * from './lib/types/ScheduledTaskTypes';\n\nexport { loadListeners } from './listeners/_load';\n\ndeclare module '@sapphire/pieces' {\n\tinterface Container {\n\t\ttasks: ScheduledTaskHandler;\n\t}\n\n\tinterface StoreRegistryEntries {\n\t\t'scheduled-tasks': ScheduledTaskStore;\n\t}\n}\n\ndeclare module 'discord.js' {\n\texport interface ClientOptions {\n\t\ttasks: ScheduledTaskHandlerOptions;\n\t\t/**\n\t\t * If the the pre-included scheduled task error listeners should be loaded\n\t\t * @default true\n\t\t */\n\t\tloadScheduledTaskErrorListeners?: boolean;\n\t}\n}\n\n/**\n * The [@sapphire/plugin-scheduled-tasks](https://github.com/sapphiredev/plugins/blob/main/packages/scheduled-tasks) 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 */\n// eslint-disable-next-line @typescript-eslint/no-inferrable-types\nexport const version: string = '10.0.2-next.f5fa1f7';\n"]}
1
+ {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAwCO,IAAM,OAAkB,GAAA","file":"index.cjs","sourcesContent":["import type { ScheduledTaskHandler } from './lib/ScheduledTaskHandler';\nimport type { ScheduledTaskStore } from './lib/structures/ScheduledTaskStore';\nimport type { ScheduledTaskHandlerOptions } from './lib/types/ScheduledTaskTypes';\n\nexport * from './lib/ScheduledTaskHandler';\nexport * from './lib/structures/ScheduledTask';\nexport * from './lib/structures/ScheduledTaskStore';\nexport * from './lib/types/ScheduledTaskEvents';\nexport type * from './lib/types/ScheduledTaskTypes';\n\nexport { loadListeners } from './listeners/_load';\n\ndeclare module '@sapphire/pieces' {\n\tinterface Container {\n\t\ttasks: ScheduledTaskHandler;\n\t}\n\n\tinterface StoreRegistryEntries {\n\t\t'scheduled-tasks': ScheduledTaskStore;\n\t}\n}\n\ndeclare module 'discord.js' {\n\texport interface ClientOptions {\n\t\ttasks: ScheduledTaskHandlerOptions;\n\t\t/**\n\t\t * If the the pre-included scheduled task error listeners should be loaded\n\t\t * @default true\n\t\t */\n\t\tloadScheduledTaskErrorListeners?: boolean;\n\t}\n}\n\n/**\n * The [@sapphire/plugin-scheduled-tasks](https://github.com/sapphiredev/plugins/blob/main/packages/scheduled-tasks) 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 */\n// eslint-disable-next-line @typescript-eslint/no-inferrable-types\nexport const version: string = '10.0.2-next.f8b2f60';\n"]}
@@ -5,7 +5,7 @@ export * from './lib/structures/ScheduledTaskStore.mjs';
5
5
  export * from './lib/types/ScheduledTaskEvents.mjs';
6
6
  export { loadListeners } from './listeners/_load.mjs';
7
7
 
8
- var version = "10.0.2-next.f5fa1f7";
8
+ var version = "10.0.2-next.f8b2f60";
9
9
 
10
10
  export { version };
11
11
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;AAwCO,IAAM,OAAkB,GAAA","file":"index.mjs","sourcesContent":["import type { ScheduledTaskHandler } from './lib/ScheduledTaskHandler';\nimport type { ScheduledTaskStore } from './lib/structures/ScheduledTaskStore';\nimport type { ScheduledTaskHandlerOptions } from './lib/types/ScheduledTaskTypes';\n\nexport * from './lib/ScheduledTaskHandler';\nexport * from './lib/structures/ScheduledTask';\nexport * from './lib/structures/ScheduledTaskStore';\nexport * from './lib/types/ScheduledTaskEvents';\nexport type * from './lib/types/ScheduledTaskTypes';\n\nexport { loadListeners } from './listeners/_load';\n\ndeclare module '@sapphire/pieces' {\n\tinterface Container {\n\t\ttasks: ScheduledTaskHandler;\n\t}\n\n\tinterface StoreRegistryEntries {\n\t\t'scheduled-tasks': ScheduledTaskStore;\n\t}\n}\n\ndeclare module 'discord.js' {\n\texport interface ClientOptions {\n\t\ttasks: ScheduledTaskHandlerOptions;\n\t\t/**\n\t\t * If the the pre-included scheduled task error listeners should be loaded\n\t\t * @default true\n\t\t */\n\t\tloadScheduledTaskErrorListeners?: boolean;\n\t}\n}\n\n/**\n * The [@sapphire/plugin-scheduled-tasks](https://github.com/sapphiredev/plugins/blob/main/packages/scheduled-tasks) 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 */\n// eslint-disable-next-line @typescript-eslint/no-inferrable-types\nexport const version: string = '10.0.2-next.f5fa1f7';\n"]}
1
+ {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;AAwCO,IAAM,OAAkB,GAAA","file":"index.mjs","sourcesContent":["import type { ScheduledTaskHandler } from './lib/ScheduledTaskHandler';\nimport type { ScheduledTaskStore } from './lib/structures/ScheduledTaskStore';\nimport type { ScheduledTaskHandlerOptions } from './lib/types/ScheduledTaskTypes';\n\nexport * from './lib/ScheduledTaskHandler';\nexport * from './lib/structures/ScheduledTask';\nexport * from './lib/structures/ScheduledTaskStore';\nexport * from './lib/types/ScheduledTaskEvents';\nexport type * from './lib/types/ScheduledTaskTypes';\n\nexport { loadListeners } from './listeners/_load';\n\ndeclare module '@sapphire/pieces' {\n\tinterface Container {\n\t\ttasks: ScheduledTaskHandler;\n\t}\n\n\tinterface StoreRegistryEntries {\n\t\t'scheduled-tasks': ScheduledTaskStore;\n\t}\n}\n\ndeclare module 'discord.js' {\n\texport interface ClientOptions {\n\t\ttasks: ScheduledTaskHandlerOptions;\n\t\t/**\n\t\t * If the the pre-included scheduled task error listeners should be loaded\n\t\t * @default true\n\t\t */\n\t\tloadScheduledTaskErrorListeners?: boolean;\n\t}\n}\n\n/**\n * The [@sapphire/plugin-scheduled-tasks](https://github.com/sapphiredev/plugins/blob/main/packages/scheduled-tasks) 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 */\n// eslint-disable-next-line @typescript-eslint/no-inferrable-types\nexport const version: string = '10.0.2-next.f8b2f60';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapphire/plugin-scheduled-tasks",
3
- "version": "10.0.2-next.f5fa1f7",
3
+ "version": "10.0.2-next.f8b2f60",
4
4
  "description": "Plugin for @sapphire/framework to have scheduled tasks",
5
5
  "author": "@sapphire",
6
6
  "license": "MIT",
@@ -51,14 +51,14 @@
51
51
  "dependencies": {
52
52
  "@sapphire/stopwatch": "^1.5.2",
53
53
  "@sapphire/utilities": "^3.17.0",
54
- "bullmq": "5.12.9"
54
+ "bullmq": "5.12.14"
55
55
  },
56
56
  "devDependencies": {
57
- "@favware/cliff-jumper": "^4.0.3",
57
+ "@favware/cliff-jumper": "^4.1.0",
58
58
  "@favware/rollup-type-bundler": "^3.3.0",
59
- "concurrently": "^8.2.2",
59
+ "concurrently": "^9.0.1",
60
60
  "tsup": "^8.2.4",
61
- "tsx": "^4.17.0",
61
+ "tsx": "^4.19.0",
62
62
  "typedoc": "^0.25.13",
63
63
  "typedoc-json-parser": "^10.0.0",
64
64
  "typescript": "~5.4.5"