Skip to content
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.

Commit

Permalink
refactor(event): rename the messagecreated event to be more clear to …
Browse files Browse the repository at this point in the history
…it's purpose
  • Loading branch information
zikeji committed Sep 28, 2020
1 parent b14857e commit 2aa08f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const debug = Debug("events:message-create");
export default class extends SomnusEvent {
constructor(somnus: SomnusClient) {
super(somnus, {
name: "MessageCreate",
name: "MonitorHandler",
event: "messageCreate",
});
}
Expand Down
8 changes: 5 additions & 3 deletions tests/events.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { Message } from "eris";
import { SomnusClient } from "../src";
import MessageCreate from "../src/events/MessageCreate";
import MonitorHandler from "../src/events/MonitorHandler";

describe("MessageCreate event", function () {
let module: MessageCreate;
let module: MonitorHandler;
it("should construct", function () {
module = new MessageCreate(({ on: () => null } as unknown) as SomnusClient);
module = new MonitorHandler(({
on: () => null,
} as unknown) as SomnusClient);
});
it("should do something?", async function () {
module.run({ content: "test" } as Message);
Expand Down

0 comments on commit 2aa08f8

Please sign in to comment.