Skip to content

Commit 90099b6

Browse files
authored
Merge pull request #4 from MastiderMast/ts-upgrade
Upgraded to Typescript
2 parents 6f361a3 + 561234f commit 90099b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1643
-370
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.eslintrc.cjs

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1-
// eslint-disable-next-line no-undef
21
module.exports = {
32
'env': {
4-
'node': true,
5-
'es6': true
3+
'browser': true,
4+
'es2021': true
65
},
7-
'extends': 'eslint:recommended',
6+
'extends': [
7+
'eslint:recommended',
8+
'plugin:@typescript-eslint/recommended'
9+
],
810
'overrides': [
911
{
10-
'files': ['src/**/*'],
12+
'env': {
13+
'node': true
14+
},
15+
'files': [
16+
'.eslintrc.{js,cjs}'
17+
],
18+
'parserOptions': {
19+
'sourceType': 'script'
20+
}
1121
}
1222
],
23+
'parser': '@typescript-eslint/parser',
1324
'parserOptions': {
1425
'ecmaVersion': 'latest',
1526
'sourceType': 'module'
1627
},
28+
'plugins': [
29+
'@typescript-eslint'
30+
],
1731
'rules': {
1832
'indent': [
1933
'error',
@@ -32,4 +46,4 @@ module.exports = {
3246
'always'
3347
]
3448
}
35-
};
49+
};

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,5 @@ dist
107107
### ###
108108
### FOR THIS PROJECT ###
109109
### ###
110-
src/data/config.js
110+
src/data/config.ts
111111
old

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
Simple and easy to use Slash Command Handler for Discord.js v14.
33

44
## Prerequisites
5-
- Node.js v18.16.0 or newer is recommended. Older versions might work. You can download it [here](https://nodejs.org/en/download/).
5+
- Node.js v18.16.1 or newer is recommended. Older versions might work. You can download it [here](https://nodejs.org/en/download/).
6+
- Typescript v5.1.6 or newer is recommended. Older versions might work. You can download it [here](https://www.typescriptlang.org/download).
67

78
## Installation
8-
1. Fill out the `config.js.TEMPLATE` located in the `src/data` folder.
9-
2. Rename the `config.js.TEMPLATE` to `config.js`
9+
1. Fill out the `config.ts.TEMPLATE` located in the `src/data` folder.
10+
2. Rename the `config.ts.TEMPLATE` to `config.ts`
1011
3. Run the following command to install the package: `npm install`
12+
4. Build the bot with the following command: `npm run build`
1113
4. Run the bot with the following command: `npm start` or `node .`
1214
5. Enjoy!
1315

@@ -19,4 +21,4 @@ You only need to specify the interaction like the already existing ones in the `
1921
Just make a pull request and I will review it.
2022

2123
## License
22-
[MIT](https://choosealicense.com/licenses/mit/)
24+
[MIT](https://choosealicense.com/licenses/mit/)

0 commit comments

Comments
 (0)