virello 0.1.0 → 0.1.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.
Files changed (67) hide show
  1. package/BREAKING_CHANGES.md +19 -0
  2. package/README.md +15 -15
  3. package/docs/console-logging.md +25 -25
  4. package/docs/engine.md +8 -8
  5. package/docs/sharding-recovery.md +3 -3
  6. package/docs/sharding-scaling.md +2 -2
  7. package/docs/sharding-stats.md +3 -3
  8. package/examples/README.md +12 -12
  9. package/examples/bot.ts +2 -2
  10. package/examples/client.ts +4 -4
  11. package/examples/commands/ping.ts +1 -1
  12. package/examples/commands/shard.ts +2 -2
  13. package/examples/commands/stats.ts +2 -2
  14. package/examples/config.ts +1 -1
  15. package/examples/contracts.ts +1 -1
  16. package/examples/coordinator.ts +1 -1
  17. package/examples/engine/live.ts +3 -3
  18. package/examples/engine/offline.ts +2 -2
  19. package/examples/host.ts +1 -1
  20. package/examples/listeners/ready.ts +2 -2
  21. package/examples/logging.ts +1 -1
  22. package/examples/offline.ts +2 -2
  23. package/examples/registration.ts +2 -2
  24. package/examples/shutdown.ts +1 -1
  25. package/examples/stats.ts +1 -1
  26. package/package.json +2 -2
  27. package/src/commands/checks/containers/Entry.ts +3 -3
  28. package/src/commands/registration/computeDifferences/option/channelTypes.ts +1 -1
  29. package/src/commands/registration/computeDifferences/option/type.ts +2 -2
  30. package/src/commands/registration/computeDifferences/options.ts +3 -3
  31. package/src/commands/types.ts +1 -1
  32. package/src/core/Container.ts +5 -5
  33. package/src/core/client/{RiloClient.ts → VirelloClient.ts} +24 -19
  34. package/src/core/config/extensions.ts +1 -1
  35. package/src/core/index.ts +1 -1
  36. package/src/core/lifecycle/Extension.ts +5 -5
  37. package/src/core/loading/constants.ts +1 -1
  38. package/src/core/logging/LoggerLike.ts +5 -5
  39. package/src/core/logging/console.ts +9 -9
  40. package/src/core/logging/format.ts +3 -3
  41. package/src/core/runtime.ts +1 -1
  42. package/src/engine/gateway/GatewayShard.ts +2 -2
  43. package/src/engine/rest/RestClient.ts +2 -1
  44. package/src/events/events.ts +74 -59
  45. package/src/extensions/localisation/extension.ts +2 -2
  46. package/src/extensions/patternCommands/extension.ts +2 -2
  47. package/src/extensions/scheduledTasks/backends/RedisBackend.ts +1 -1
  48. package/src/extensions/scheduledTasks/extension.ts +2 -2
  49. package/src/extensions/scheduledTasks/types/TaskTypes.ts +1 -1
  50. package/src/extensions/services/extension.ts +2 -2
  51. package/src/extensions/subcommands/extension.ts +2 -2
  52. package/src/index.ts +1 -1
  53. package/src/public/client.ts +2 -2
  54. package/src/sharding/client/Link.ts +5 -5
  55. package/src/sharding/client/gateway.ts +1 -1
  56. package/src/sharding/coordinator/Coordinator.ts +4 -4
  57. package/src/sharding/manager/Manager.ts +6 -6
  58. package/src/sharding/stats.ts +1 -1
  59. package/src/sharding/types.ts +3 -3
  60. package/src/utilities/collections/bitfield/BitField.ts +1 -1
  61. package/src/utilities/decorators/module-decorators.ts +1 -1
  62. package/src/utilities/discord/pagination/PaginatedMessage.ts +10 -10
  63. package/src/utilities/discord/pagination/Pagination.ts +1 -1
  64. package/src/utilities/discord/snowflake/Snowflake.ts +5 -5
  65. package/src/utilities/parsing/strategies/FlagUnorderedStrategy.ts +1 -1
  66. package/src/utilities/result/Option.ts +2 -2
  67. package/src/utilities/result/Result.ts +3 -3
@@ -22,7 +22,7 @@ import type { IPreconditionContainer } from "./Container";
22
22
 
23
23
  /** Defines the simple options for the {@link PreconditionContainerSingle}, where only the name of the precondition can be defined. */
24
24
  export interface SimplePreconditionSingleResolvableDetails {
25
- /** The name of the precondition to retrieve from {@link RiloClient.preconditions}. */
25
+ /** The name of the precondition to retrieve from {@link VirelloClient.preconditions}. */
26
26
  name: SimplePreconditionKeys;
27
27
  }
28
28
 
@@ -30,7 +30,7 @@ export interface SimplePreconditionSingleResolvableDetails {
30
30
  export interface PreconditionSingleResolvableDetails<
31
31
  K extends PreconditionKeys = PreconditionKeys,
32
32
  > {
33
- /** The name of the precondition to retrieve from {@link RiloClient.preconditions}. */
33
+ /** The name of the precondition to retrieve from {@link VirelloClient.preconditions}. */
34
34
  name: K;
35
35
 
36
36
  /** The context to be set at {@link PreconditionContainerSingle.context}. */
@@ -43,7 +43,7 @@ export type PreconditionSingleResolvable =
43
43
  | SimplePreconditionSingleResolvableDetails
44
44
  | PreconditionSingleResolvableDetails;
45
45
 
46
- /** An {@link IPreconditionContainer} which runs a single precondition from {@link RiloClient.preconditions}. */
46
+ /** An {@link IPreconditionContainer} which runs a single precondition from {@link VirelloClient.preconditions}. */
47
47
  export class PreconditionContainerSingle implements IPreconditionContainer {
48
48
  /** Context passed to the precondition. String entries get an empty object. */
49
49
  public readonly context: Record<PropertyKey, unknown>;
@@ -26,7 +26,7 @@ const channelTypeToPrettyName: Record<
26
26
  };
27
27
 
28
28
  const unknownChannelType = (type: number): string =>
29
- `unknown channel type (${type}); please contact Rilo developers about this!`;
29
+ `unknown channel type (${type}); please contact Virello developers about this!`;
30
30
 
31
31
  function getChannelTypePrettyName(
32
32
  type: keyof typeof channelTypeToPrettyName,
@@ -12,14 +12,14 @@ export function* checkOptionType({
12
12
  }): Generator<CommandDifference> {
13
13
  const expectedTypeString =
14
14
  optionTypeToPrettyName.get(expectedType) ??
15
- `unknown (${expectedType}); please contact Rilo developers about this!`;
15
+ `unknown (${expectedType}); please contact Virello developers about this!`;
16
16
 
17
17
  if (originalType !== expectedType) {
18
18
  yield {
19
19
  key,
20
20
  original:
21
21
  optionTypeToPrettyName.get(originalType) ??
22
- `unknown (${originalType}); please contact Rilo developers about this!`,
22
+ `unknown (${originalType}); please contact Virello developers about this!`,
23
23
  expected: expectedTypeString,
24
24
  };
25
25
  }
@@ -62,7 +62,7 @@ export function* checkOptions(
62
62
  while ((option = existingOptions![index]) !== undefined) {
63
63
  const expectedType =
64
64
  optionTypeToPrettyName.get(option.type) ??
65
- `unknown (${option.type}); please contact Rilo developers about this!`;
65
+ `unknown (${option.type}); please contact Virello developers about this!`;
66
66
 
67
67
  yield {
68
68
  key: `existing command option at index ${index}`,
@@ -91,7 +91,7 @@ function* reportOptionDifferences({
91
91
  if (!existingOption) {
92
92
  const expectedType =
93
93
  optionTypeToPrettyName.get(option.type) ??
94
- `unknown (${option.type}); please contact Rilo developers about this!`;
94
+ `unknown (${option.type}); please contact Virello developers about this!`;
95
95
 
96
96
  yield {
97
97
  key: keyPath(currentIndex),
@@ -295,7 +295,7 @@ function* handleSubcommandOptions({
295
295
  while ((option = existingOptions![processedIndex]) !== undefined) {
296
296
  const expectedType =
297
297
  optionTypeToPrettyName.get(option.type) ??
298
- `unknown (${option.type}); please contact Rilo developers about this!`;
298
+ `unknown (${option.type}); please contact Virello developers about this!`;
299
299
 
300
300
  yield {
301
301
  key: `existing command option at path ${keyPath(currentIndex)}.options[${processedIndex}]`,
@@ -18,7 +18,7 @@ import type { ApplicationCommandRegistry } from "./registration/Registry";
18
18
  export type DetailedDescriptionCommand =
19
19
  string | DetailedDescriptionCommandObject;
20
20
 
21
- /** Augmentable shape for application-specific command help data. Rilo stores it without interpreting its fields. */
21
+ /** Augmentable shape for application-specific command help data. Virello stores it without interpreting its fields. */
22
22
  export interface DetailedDescriptionCommandObject {}
23
23
 
24
24
  /** The allowed values for {@link CommandOptions.runIn}. */
@@ -3,16 +3,16 @@ import type { LocaleManager } from "../extensions/localisation/LocaleManager";
3
3
  import type { TaskScheduler } from "../extensions/scheduledTasks/TaskScheduler";
4
4
  import type { Services } from "../extensions/services/Services";
5
5
  import type { ShardLink } from "../sharding/client/Link";
6
- import type { RiloClient } from "./client/RiloClient";
6
+ import type { VirelloClient } from "./client/VirelloClient";
7
7
  import type { LoggerLike } from "./logging/LoggerLike";
8
8
  import { ModuleRegistry } from "./modules/ModuleRegistry";
9
9
 
10
- /** Shared client services. Add your own properties by augmenting rilo. */
10
+ /** Shared client services. Add your own properties by augmenting virello. */
11
11
  export interface Container {
12
12
  /** The current module registry; initialized even before a client is created. */
13
13
  modules: ModuleRegistry;
14
- /** The active RiloClient. Available after construction and removed on shutdown. */
15
- client: RiloClient;
14
+ /** The active VirelloClient. Available after construction and removed on shutdown. */
15
+ client: VirelloClient;
16
16
  /** The active client's shard messaging and live stats API. */
17
17
  readonly sharding: ShardLink;
18
18
  /** The active client’s logger. Assigned during client construction. */
@@ -30,7 +30,7 @@ export interface Container {
30
30
  services: Services;
31
31
  }
32
32
 
33
- /** Shared framework services. Client-specific entries are populated by RiloClient and enabled extensions. */
33
+ /** Shared framework services. Client-specific entries are populated by VirelloClient and enabled extensions. */
34
34
  export const container = {
35
35
  /** Initial shared registry, replaced by the active client’s module registry. */
36
36
  modules: new ModuleRegistry(),
@@ -50,8 +50,8 @@ export type Prefix = string | readonly string[] | null;
50
50
  */
51
51
  export type PrefixHook = (message: Message) => Awaitable<Prefix>;
52
52
 
53
- /** Rilo options added to discord.js ClientOptions. */
54
- export interface RiloClientOptions {
53
+ /** Virello options added to discord.js ClientOptions. */
54
+ export interface VirelloClientOptions {
55
55
  /** Configure built-in features and custom extensions. Built-ins run first, in the documented extension order. */
56
56
  extensions?: ExtensionOptions;
57
57
  /** Base directory for module patterns. Defaults to cwd. */
@@ -73,7 +73,7 @@ export interface RiloClientOptions {
73
73
  /** The regex prefix, an alternative to a mention or regular prefix to allow creating natural language command messages */
74
74
  regexPrefix?: RegExp;
75
75
 
76
- /** The prefix hook, by default it is a callback function that returns {@link RiloClientOptions.defaultPrefix}.
76
+ /** The prefix hook, by default it is a callback function that returns {@link VirelloClientOptions.defaultPrefix}.
77
77
  * @default () => client.options.defaultPrefix */
78
78
  fetchPrefix?: PrefixHook;
79
79
 
@@ -82,7 +82,7 @@ export interface RiloClientOptions {
82
82
 
83
83
  /** Supply your logger instance directly. Its identity and settings are preserved. */
84
84
  logger?: LoggerLike;
85
- /** Used only when Rilo creates its own logger. */
85
+ /** Used only when Virello creates its own logger. */
86
86
  loggerOptions?: Partial<LoggerOptions>;
87
87
  /** Formatting for the framework-created console logger. Supplied loggers are untouched. */
88
88
  logging?: ConsoleLogOptions;
@@ -125,10 +125,12 @@ interface FeatureState {
125
125
  restoreProperties: () => void;
126
126
  active: boolean;
127
127
  }
128
- const clientState: { active?: RiloClient } = {};
128
+ const clientState: { active?: VirelloClient } = {};
129
129
 
130
130
  /** One active Discord client owns the shared services. */
131
- export class RiloClient<Ready extends boolean = boolean> extends Client<Ready> {
131
+ export class VirelloClient<
132
+ Ready extends boolean = boolean,
133
+ > extends Client<Ready> {
132
134
  /** Bot user ID used for mention prefixes, or null before it is known. */
133
135
  public override id: Snowflake | null = null;
134
136
  /** Resolve prefixes for each message. Defaults to returning options.defaultPrefix or null. */
@@ -161,8 +163,8 @@ export class RiloClient<Ready extends boolean = boolean> extends Client<Ready> {
161
163
 
162
164
  /**
163
165
  * Create the shared client, register stores, and run synchronous extension setup. Discord connects at login.
164
- * @param options - Discord client options, including intents and Rilo settings.
165
- * @throws If options are invalid, another RiloClient is active, or required setup fails. Managed children reject
166
+ * @param options - Discord client options, including intents and Virello settings.
167
+ * @throws If options are invalid, another VirelloClient is active, or required setup fails. Managed children reject
166
168
  * conflicting shard options.
167
169
  */
168
170
  public constructor(options: ClientOptions) {
@@ -197,7 +199,7 @@ export class RiloClient<Ready extends boolean = boolean> extends Client<Ready> {
197
199
  ])
198
200
  if (key in options)
199
201
  throw new TypeError(
200
- `Rilo no longer supports "${key}". See BREAKING_CHANGES.md.`,
202
+ `Virello no longer supports "${key}". See BREAKING_CHANGES.md.`,
201
203
  );
202
204
  const extensions = resolveExtensions(options.extensions);
203
205
  if (options.extensions?.scheduledtasks)
@@ -236,14 +238,14 @@ export class RiloClient<Ready extends boolean = boolean> extends Client<Ready> {
236
238
  );
237
239
  if (clientState.active)
238
240
  throw new Error(
239
- "Only one RiloClient can be active. Await client.destroy() before creating another.",
241
+ "Only one VirelloClient can be active. Await client.destroy() before creating another.",
240
242
  );
241
243
  super(options);
242
244
  this.extensions = extensions;
243
245
  this.logger =
244
246
  options.logger ??
245
247
  (this.ownedLogger = createConsoleLogger(
246
- "Rilo",
248
+ "Virello",
247
249
  options.loggerOptions,
248
250
  options.logging,
249
251
  ));
@@ -350,7 +352,7 @@ export class RiloClient<Ready extends boolean = boolean> extends Client<Ready> {
350
352
  */
351
353
  public load(): Promise<void> {
352
354
  if (this.closed)
353
- return Promise.reject(new Error("This RiloClient is closed."));
355
+ return Promise.reject(new Error("This VirelloClient is closed."));
354
356
  return this.modules.load();
355
357
  }
356
358
 
@@ -362,7 +364,7 @@ export class RiloClient<Ready extends boolean = boolean> extends Client<Ready> {
362
364
  */
363
365
  public override login(token?: string): Promise<string> {
364
366
  if (this.closed)
365
- return Promise.reject(new Error("This RiloClient is closed."));
367
+ return Promise.reject(new Error("This VirelloClient is closed."));
366
368
  this.loginPromise ??= this.connect(token);
367
369
  return this.loginPromise;
368
370
  }
@@ -592,11 +594,14 @@ export class RiloClient<Ready extends boolean = boolean> extends Client<Ready> {
592
594
  }
593
595
  if (clientState.active === this) clientState.active = undefined;
594
596
  if (errors.length)
595
- throw new AggregateError(errors, "Some Rilo features could not close.");
597
+ throw new AggregateError(
598
+ errors,
599
+ "Some Virello features could not close.",
600
+ );
596
601
  }
597
602
 
598
603
  private assertOpen(): void {
599
- if (this.closed) throw new Error("This RiloClient is closed.");
604
+ if (this.closed) throw new Error("This VirelloClient is closed.");
600
605
  }
601
606
  }
602
607
 
@@ -614,9 +619,9 @@ export interface CooldownOptions {
614
619
  filteredCommands?: string[];
615
620
  }
616
621
 
617
- /** Add Rilo client properties and options to discord.js types. */
622
+ /** Add Virello client properties and options to discord.js types. */
618
623
  declare module "discord.js" {
619
- /** Framework services available on a RiloClient. */
624
+ /** Framework services available on a VirelloClient. */
620
625
  interface Client {
621
626
  /** Bot user ID used for mention prefixes, or null before it is known. */
622
627
  id: Snowflake | null;
@@ -628,8 +633,8 @@ declare module "discord.js" {
628
633
  fetchPrefix: PrefixHook;
629
634
  }
630
635
 
631
- /** Discord client options with Rilo configuration. */
632
- interface ClientOptions extends RiloClientOptions {
636
+ /** Discord client options with Virello configuration. */
637
+ interface ClientOptions extends VirelloClientOptions {
633
638
  /** Configure built-in features and custom extensions. */
634
639
  extensions?: ExtensionOptions;
635
640
  }
@@ -5,7 +5,7 @@ import { TasksExtension } from "../../extensions/scheduledTasks/extension";
5
5
  import type { TaskSchedulerOptions } from "../../extensions/scheduledTasks/types/TaskTypes";
6
6
  import { ServicesExtension } from "../../extensions/services/extension";
7
7
  import { SubcommandsExtension } from "../../extensions/subcommands/extension";
8
- import type { CooldownOptions } from "../client/RiloClient";
8
+ import type { CooldownOptions } from "../client/VirelloClient";
9
9
  import { Extension } from "../lifecycle/Extension";
10
10
 
11
11
  /** Settings for subcommand handling. */
package/src/core/index.ts CHANGED
@@ -38,7 +38,7 @@ export * from "../events/listenerModuleLoader";
38
38
  export * from "../events/listenerStore";
39
39
  export type { Awaitable } from "../utilities/index";
40
40
  export * from "../utilities/result/index";
41
- export * from "./client/RiloClient";
41
+ export * from "./client/VirelloClient";
42
42
  export * from "./lifecycle/Extension";
43
43
  export * from "./logging/index";
44
44
  export * from "./logging/LoggerLike";
@@ -1,7 +1,7 @@
1
1
  import type { Awaitable } from "../../utilities/index";
2
- import type { RiloClient } from "../client/RiloClient";
2
+ import type { VirelloClient } from "../client/VirelloClient";
3
3
 
4
- /** Base class for client features. Override static hooks; Rilo uses the class without constructing it. */
4
+ /** Base class for client features. Override static hooks; Virello uses the class without constructing it. */
5
5
  export abstract class Extension {
6
6
  /** Fail client startup when a hook fails if true. Otherwise disable this feature and clean up its registrations. Defaults to false. */
7
7
  static readonly critical: boolean = false;
@@ -9,17 +9,17 @@ export abstract class Extension {
9
9
  * Register stores, modules, and resources synchronously during client construction.
10
10
  * @param _client - Client being configured. Use addDisposer for owned resources.
11
11
  */
12
- static setup(_client: RiloClient): void {}
12
+ static setup(_client: VirelloClient): void {}
13
13
  /**
14
14
  * Prepare services after modules and managed sharding load, before Discord login. Hooks run in extension order.
15
15
  * @param _client - Client being started.
16
16
  * @returns Completion of this phase.
17
17
  */
18
- static beforeLogin(_client: RiloClient): Awaitable<void> {}
18
+ static beforeLogin(_client: VirelloClient): Awaitable<void> {}
19
19
  /**
20
20
  * Start work after Discord login finishes. Hooks run in extension order.
21
21
  * @param _client - Connected client.
22
22
  * @returns Completion of this phase.
23
23
  */
24
- static afterLogin(_client: RiloClient): Awaitable<void> {}
24
+ static afterLogin(_client: VirelloClient): Awaitable<void> {}
25
25
  }
@@ -1,2 +1,2 @@
1
1
  export const VirtualPath = "::virtual::";
2
- export const RegisteredModules = Symbol("rilo:registeredModules");
2
+ export const RegisteredModules = Symbol("virello:registeredModules");
@@ -1,27 +1,27 @@
1
- /** The four methods Rilo uses. Existing logger instances stay untouched. */
1
+ /** The four methods Virello uses. Existing logger instances stay untouched. */
2
2
  export interface LoggerLike {
3
3
  /**
4
4
  * Write diagnostic detail.
5
5
  * @param value - Log value.
6
- * @returns The logger’s own result; Rilo ignores it.
6
+ * @returns The logger’s own result; Virello ignores it.
7
7
  */
8
8
  debug(value: unknown): unknown;
9
9
  /**
10
10
  * Write an informational notice.
11
11
  * @param value - Log value.
12
- * @returns The logger’s own result; Rilo ignores it.
12
+ * @returns The logger’s own result; Virello ignores it.
13
13
  */
14
14
  notif(value: unknown): unknown;
15
15
  /**
16
16
  * Write a warning.
17
17
  * @param value - Log value.
18
- * @returns The logger’s own result; Rilo ignores it.
18
+ * @returns The logger’s own result; Virello ignores it.
19
19
  */
20
20
  alert(value: unknown): unknown;
21
21
  /**
22
22
  * Write a failure.
23
23
  * @param value - Log value, usually an Error.
24
- * @returns The logger’s own result; Rilo ignores it.
24
+ * @returns The logger’s own result; Virello ignores it.
25
25
  */
26
26
  error(value: unknown): unknown;
27
27
  }
@@ -59,7 +59,7 @@ function widthFor(settings: Settings, level: LogLevel): number {
59
59
  return textWidth(
60
60
  settings.output.width ??
61
61
  settings.options.box?.width ??
62
- Number(process.env.RILO_LOG_WIDTH),
62
+ Number(process.env.VIRELLO_LOG_WIDTH),
63
63
  detected,
64
64
  );
65
65
  }
@@ -138,18 +138,18 @@ function serialize(
138
138
  }
139
139
 
140
140
  /**
141
- * Create a logger with Rilo console formatting and the native logger’s streams, filters, and file lifecycle.
142
- * @param name - Logger name; defaults to Rilo.
141
+ * Create a logger with Virello console formatting and the native logger’s streams, filters, and file lifecycle.
142
+ * @param name - Logger name; defaults to Virello.
143
143
  * @param options - Native logger settings.
144
144
  * @param output - Console formatting and redaction settings.
145
145
  * @returns A new logger. Await close() when its resources are no longer needed.
146
146
  */
147
147
  export function createConsoleLogger(
148
- name = "Rilo",
148
+ name = "Virello",
149
149
  options: Partial<LoggerOptions> = {},
150
150
  output: ConsoleLogOptions = {},
151
151
  ): Logger {
152
- const requestedLevel = process.env.RILO_LOG_LEVEL?.toLowerCase() ?? "info";
152
+ const requestedLevel = process.env.VIRELLO_LOG_LEVEL?.toLowerCase() ?? "info";
153
153
  const level =
154
154
  options.level ??
155
155
  (Object.hasOwn(levels, requestedLevel) ? levels[requestedLevel] : "NOTIF");
@@ -161,15 +161,15 @@ export function createConsoleLogger(
161
161
  options.relativePaths !== undefined
162
162
  )
163
163
  return new Logger({ name, level, ...options });
164
- const layout = options.layout ?? process.env.RILO_LOG_LAYOUT;
165
- const detail = output.detail ?? process.env.RILO_LOG_DETAIL;
166
- const stackSetting = output.stacks ?? process.env.RILO_LOG_STACKS;
164
+ const layout = options.layout ?? process.env.VIRELLO_LOG_LAYOUT;
165
+ const detail = output.detail ?? process.env.VIRELLO_LOG_DETAIL;
166
+ const stackSetting = output.stacks ?? process.env.VIRELLO_LOG_STACKS;
167
167
  const settings: Settings = {
168
168
  options,
169
169
  output,
170
170
  format:
171
171
  output.format ??
172
- (process.env.RILO_LOG_FORMAT === "json" ? "json" : "text"),
172
+ (process.env.VIRELLO_LOG_FORMAT === "json" ? "json" : "text"),
173
173
  stacks:
174
174
  stackSetting === "off" || stackSetting === "full"
175
175
  ? stackSetting
@@ -1,11 +1,11 @@
1
1
  import type { LogLevel } from "@lilsnibbi/logger";
2
2
  import { dataProperty, safeContext, safeText } from "./redact";
3
3
 
4
- /** Console output settings used when Rilo creates a logger. */
4
+ /** Console output settings used when Virello creates a logger. */
5
5
  export interface ConsoleLogOptions {
6
- /** Overrides RILO_LOG_FORMAT. Default: text. */
6
+ /** Overrides VIRELLO_LOG_FORMAT. Default: text. */
7
7
  format?: "text" | "json";
8
- /** Overrides RILO_LOG_STACKS. Default: short (three source locations). */
8
+ /** Overrides VIRELLO_LOG_STACKS. Default: short (three source locations). */
9
9
  stacks?: "off" | "short" | "full";
10
10
  /** Additional credential values to scrub. Values shorter than six characters are ignored. */
11
11
  redact?: readonly string[];
@@ -1,2 +1,2 @@
1
1
  if (typeof Bun === "undefined")
2
- throw new Error("Rilo runs on Bun. Start your bot with bun.");
2
+ throw new Error("Virello runs on Bun. Start your bot with bun.");
@@ -291,8 +291,8 @@ export class GatewayShard {
291
291
  shard: this.shard,
292
292
  properties: {
293
293
  os: process.platform,
294
- browser: "rilo-engine",
295
- device: "rilo-engine",
294
+ browser: "virello-engine",
295
+ device: "virello-engine",
296
296
  },
297
297
  },
298
298
  });
@@ -273,7 +273,8 @@ export class RestClient {
273
273
  );
274
274
  try {
275
275
  const headers = new Headers({
276
- "User-Agent": "RiloEngine (https://discord.com/developers/docs, 0.1.0)",
276
+ "User-Agent":
277
+ "VirelloEngine (https://discord.com/developers/docs, 0.1.0)",
277
278
  });
278
279
  if (request.auth !== false)
279
280
  headers.set("Authorization", `Bot ${this.#token}`);