fix: Improvements for previous release-logs

This commit is contained in:
xxDeveloper
2022-10-08 20:20:13 +03:00
committed by GitHub
parent dd0a61d71a
commit 3842e2dc35

View File

@@ -19,17 +19,15 @@ Quick List of changes!
- [Dependencies update](#dependencies-update)
### Class based modules
Incorporate class based modules into your project instead of the traditional `commandModule` or `eventModule`
Extend the new [CommandExecutable](docs/api/classes/CommandExecutable) or [EventExecutable](docs/api/classes/EventExecutable)
```ts title="commands/meaning-of-life.ts"
import { CommandType, CommandExecutable, type Args, type Context } from "@sern/handler";
import { publish } from "../plugins/publish.js";
import { serendipityOnly } from "../plugins/serendipityOnly.js";
import { CommandType, CommandExecutable, type Args, type Context } from '@sern/handler';
import { publish } from '../plugins/publish.js';
import { serendipityOnly } from '../plugins/serendipityOnly.js';
export default class extends CommandExecutable<CommandType.Both> {
type = CommandType.Both as const;
description = 'What is the meaning of life?'
override onEvent = [
@@ -50,11 +48,11 @@ execute must not be a method of the class. It should be as above, a property on
:::
```ts title="commands/guildMemberAdd.ts"
import { CommandType, EventExecutable, type EventType } from "@sern/handler";
```ts title="events/guildMemberAdd.ts"
import { CommandType, EventExecutable, type EventType } from '@sern/handler';
import type { GuildMember } from 'discord.js'
export default class extends EventExecutable<EventType.Discord> {
export default class extends EventExecutable<EventType.Discord> {
type = EventType.Discord as const;
// highlight-next-line
execute = (member: GuildMember) => {
@@ -78,4 +76,4 @@ The next update will bring sern v2 with some important features. Here are some t
### Dependencies Update
- TypeScript has been updated to 4.8.3
- Discord.js has been upgraded to 14.5
- Discord.js has been upgraded to 14.5