server/plugins/test.plugin.ts
2023-11-22 18:10:37 -10:00

13 lines
388 B
TypeScript

import type { Server } from "./types";
import { HookTypes } from "./types";
const registerPlugin = (server: Server) => {
server.on(HookTypes.OnPostCreate, (req, newPost, author) => {
console.log("New post created!");
console.log(`Post details: ${newPost.content} (${newPost.id})`);
console.log(`Made by ${author.username} (${author.id})`);
});
};
export default registerPlugin;