Skip to content

Commit f6e98cc

Browse files
committed
fix some missing files
1 parent 8916763 commit f6e98cc

File tree

6 files changed

+60
-4
lines changed

6 files changed

+60
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ When your terminal is created, write `npm install` in your terminal to download
9292
If you encounter any error, make you sure that you have the latest version of nodejs or ask in the discord server.
9393

9494
__Step 3.__
95-
When the modules have been downloaded and a `node-modules` directory has been created, go to the `config.js` file and setup the bot.
95+
When the modules have been downloaded and a `node-modules` directory has been created, go to the `config.ts` file in the `src` folder and setup the bot.
9696
You can find some comments about every setting.
9797

9898
__Step 4.__
99-
Now, you can start the bot by pressing `F5` or putting `node index.js` in the terminal.
99+
Now, you can start the bot by pressing `F5` or putting `npm run start` in the terminal.
100100

101101
__Step 5.__
102102
Enjoy your bot !

module/SlashUpdate.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const { REST } = require('@discordjs/rest');
22
const { Routes } = require('discord-api-types/v9');
3+
import config from "./config"
34
import { readdirSync } from "fs";
45

56
const { token } = require('./config.js');
@@ -31,12 +32,12 @@ files.forEach(cat => {
3132
setTimeout(()=>{
3233
console.log(`• Loaded ${commands.length} slash commands to refresh`);
3334
// as per d.js guide, create a rest client
34-
const rest = new REST({ version: '9' }).setToken("NzgzNzA4MDczMzkwMTEyODMw.GekgyO.rkJFM0HE9PjWfuz11HlJVK4S49FM4jg_tZ5A3I");
35+
const rest = new REST({ version: '9' }).setToken(config.token);
3536
// start the load up process
3637
(async () => {
3738
try {
3839
console.log(`• Refreshing client "946414667436269579" slash commands. Developer Mode? `);
39-
await rest.put(Routes.applicationCommands("783708073390112830"), { body: commands });
40+
await rest.put(Routes.applicationCommands(config.botId), { body: commands });
4041
console.log(`• Success! Refreshed client "946414667436269579" slash commands`);
4142
} catch (error) {
4243
console.error(error);

module/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export default {
66
],
77
// Sends a lot of info into console.
88
debug: false,
9+
botId: "",
910
// The prefix used to answer to commands
1011
prefix: "*",
1112
// Optional, for loading playlists with more than 100 tracks ( Else using a scaper )

package-lock.json

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
"petitio": "^1.4.0",
4545
"shoukaku": "^3.1.0",
4646
"spotify-url-info": "^2.2.5",
47+
"tsc": "^2.0.4",
48+
"typescript": "^4.7.4",
4749
"uuid": "^8.3.2"
4850
},
4951
"devDependencies": {

tsconfig.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"compilerOptions": {
3+
"strict": false,
4+
"outDir": "dist",
5+
"module": "commonjs",
6+
"target": "es2022",
7+
"moduleResolution": "node",
8+
"resolveJsonModule": true,
9+
"useUnknownInCatchVariables": true,
10+
"allowUnreachableCode": false,
11+
"esModuleInterop": true,
12+
"skipLibCheck": true,
13+
"importHelpers": true,
14+
"typeRoots": ["node_modules/@types"],
15+
"sourceMap": false,
16+
"strictPropertyInitialization": false
17+
},
18+
"include": ["./"],
19+
"exclude": ["/.github", "./dist", "./node_modules"]
20+
}

0 commit comments

Comments
 (0)