Skip to content

Commit 5f8d38d

Browse files
committed
maintenance update
1 parent f205a53 commit 5f8d38d

File tree

3 files changed

+1266
-1345
lines changed

3 files changed

+1266
-1345
lines changed

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313
"author": "Çetin Kaan Taşkıngenç",
1414
"license": "ISC",
1515
"dependencies": {
16-
"bing-translate-api": "^2.2.1",
16+
"bing-translate-api": "^2.6.0",
1717
"discord.js": "^13.6.0",
18-
"dotenv": "^14.2.0",
18+
"dotenv": "^16.0.0",
1919
"fastest-levenshtein": "^1.0.12",
2020
"memejs": "^2.0.1",
2121
"mongo-sanitize": "^1.1.0",
22-
"mongodb": "^4.3.1",
23-
"mongoose": "^6.1.7",
24-
"yarn-upgrade-all": "^0.6.1"
22+
"mongodb": "^4.5.0",
23+
"mongoose": "^6.3.2",
24+
"yarn-upgrade-all": "^0.7.1"
2525
},
2626
"devDependencies": {
2727
"@types/mongo-sanitize": "^1.0.1",
28-
"@types/node": "^17.0.10",
29-
"nodemon": "^2.0.15",
30-
"prettier": "^2.5.1",
31-
"ts-node": "^10.4.0",
32-
"typescript": "^4.5.4"
28+
"@types/node": "^17.0.31",
29+
"nodemon": "^2.0.16",
30+
"prettier": "^2.6.2",
31+
"ts-node": "^10.7.0",
32+
"typescript": "^4.6.4"
3333
}
3434
}

src/server.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//<> with ❤️ by Çetin Kaan Taşkıngenç & Postman Student Leaders
1+
//<> with ❤️ by Çetin Kaan Taşkıngenç & Claire Froelich
22

33
import { Client } from "discord.js";
44
import mongoose from "mongoose";
@@ -65,25 +65,24 @@ client.on("messageCreate", (message: MessageType) => {
6565
//If the message does not start with the prefix return
6666
if (!message.content.startsWith(prefix)) return;
6767

68+
//get the message content without the prefix
6869
const args: string[] = message.content
6970
.slice(prefix.length)
7071
.trim()
7172
.split(/ +/g);
7273

74+
//get the command
7375
const command: string = args.shift()!.toLowerCase();
7476

7577
//Check if the command exists in the hashmap. It returns undefined if it doesn't exist
7678
const currCommand = commands.get(command);
77-
78-
console.log(currCommand);
7979

8080

8181
//If the currCommand is not undefined,
82-
if (currCommand) currCommand.callback(message, args);
82+
if (currCommand)
83+
currCommand.callback(message, args);
8384
else
84-
message.channel.send(
85-
`Command not found! Type ${prefix} help to see all commands`
86-
);
85+
message.channel.send(`Command not found! Type ${prefix} help to see all commands`);
8786
});
8887

8988
client.login(process.env.DISCORD_TOKEN);

0 commit comments

Comments
 (0)