Skip to content

Commit

Permalink
style(#128): apply style fix lint
Browse files Browse the repository at this point in the history
+ change typescript aliases from `@<module>` to `@/<module>` (ex: `@services` -> `@/services` to distinguish them from external npm packages
  • Loading branch information
barthofu committed Feb 9, 2024
1 parent 54d2739 commit 3e3cd1c
Show file tree
Hide file tree
Showing 115 changed files with 4,954 additions and 4,144 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
**Please describe the changes this PR makes and why it should be merged:**
**Please describe the changes this PR makes and why it should be merged:**
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
<table>
<tr>
<td align="center">

# What is TSCord

#### **TSCord** is a fully-featured **[discord bot](https://discord.com/developers/docs/intro#bots-and-apps)** *template* written in [Typescript](https://www.typescriptlang.org/), intended to provide a framework that's easy to use, extend and modify.

It uses [`discordx`](https://github.com/discordx-ts/discordx) and [`discord.js v14`](https://github.com/discordjs/discord.js) under the hood to simplify the development of discord bots.

This template was created to give developers a starting point for new Discord bots, so that much of the initial setup can be avoided and developers can instead focus on meaningful bot features. Developers can simply follow the [installation](https://tscord.discbot.app/docs/bot/get-started/installation) and the [configuration](https://tscord.discbot.app/docs/bot/get-started/configuration) instructions, and have a working bot with many boilerplate features already included!
This template was created to give developers a starting point for new Discord bots, so that much of the initial setup can be avoided and developers can instead focus on meaningful bot features. Developers can simply follow the [installation](https://tscord.discbot.app/docs/bot/get-started/installation) and the [configuration](https://tscord.discbot.app/docs/bot/get-started/configuration) instructions, and have a working bot with many boilerplate features already included!
</td>
</tr>
</table>
Expand Down Expand Up @@ -91,7 +91,6 @@ https://user-images.githubusercontent.com/66025667/196367258-94c77e23-779c-4d9b-
</a>
</div>


## 📜 Features

Talking about features, here are some of the core features of the template:
Expand Down
29 changes: 17 additions & 12 deletions mikro-orm.config.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
// @ts-nocheck

import { mikroORMConfig } from "./src/configs/database"
import * as entities from "@entities"
import { PluginsManager } from "@services"
import { Options } from "@mikro-orm/core"
import { resolveDependency } from "@utils/functions"
import process from 'node:process'

import { Options } from '@mikro-orm/core'

import * as entities from '@/entities'
import { PluginsManager } from '@/services'
import { resolveDependency } from '@/utils/functions'

import { mikroORMConfig } from './src/configs/database'

export default async () => {
const pluginsManager = await resolveDependency(PluginsManager)
await pluginsManager.loadPlugins()

return {
...mikroORMConfig[process.env.NODE_ENV || 'development'] as Options<DatabaseDriver>,
entities: [...Object.values(entities), ...pluginsManager.getEntities()]
}
}
const pluginsManager = await resolveDependency(PluginsManager)
await pluginsManager.loadPlugins()

return {
...mikroORMConfig[process.env.NODE_ENV || 'development'] as Options<DatabaseDriver>,
entities: [...Object.values(entities), ...pluginsManager.getEntities()],
}

}
Loading

0 comments on commit 3e3cd1c

Please sign in to comment.