Compare commits
No commits in common. "main" and "v2.0.1" have entirely different histories.
|
@ -1,14 +1,13 @@
|
||||||
{
|
{
|
||||||
"name": "vylbot-core",
|
"name": "vylbot-core",
|
||||||
"version": "2.0.3",
|
"version": "2.0.1",
|
||||||
"description": "A discord client based upon discord.js",
|
"description": "A discord client based upon discord.js",
|
||||||
"main": "./dist/index",
|
"main": "./src/index",
|
||||||
"typings": "./dist",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"lint": "eslint .",
|
"test:coverage": "jest --coverage",
|
||||||
"publish": "np"
|
"lint": "eslint ."
|
||||||
},
|
},
|
||||||
"author": "Vylpes",
|
"author": "Vylpes",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -97,9 +97,9 @@ export class Util {
|
||||||
if (eventFiles[i].includes('.ts')) {
|
if (eventFiles[i].includes('.ts')) {
|
||||||
const eventName = eventFiles[i].split('.')[0];
|
const eventName = eventFiles[i].split('.')[0];
|
||||||
|
|
||||||
const file = require(`${process.cwd()}/${folder}/${eventName}.ts`).default;
|
const file = require(`${process.cwd()}/${folder}/${eventName}.ts`);
|
||||||
|
|
||||||
const event = new file() as Event;
|
const event = new file[eventName]() as Event;
|
||||||
|
|
||||||
// Load events
|
// Load events
|
||||||
client.on('channelCreate', event.channelCreate);
|
client.on('channelCreate', event.channelCreate);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Event } from "../../../src/type/event";
|
import { Event } from "../../../src/type/event";
|
||||||
|
|
||||||
export default class normal extends Event {
|
export class normal extends Event {
|
||||||
public override channelCreate() {}
|
public override channelCreate() {}
|
||||||
}
|
}
|
Reference in a new issue