-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4b306cc
Showing
17 changed files
with
1,819 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<h1 align="center"> Discord.js v13 Handler With Mango Db </h1> | ||
<p align="center"> | ||
<a href="https://github.com/VishalCodez/Discord.js-v13-Handler-With-Mango-Db"><img alt="GitHub Stars" src="https://img.shields.io/github/stars/Simpleboy353/REAPER-2.0?style=for-the-badge"></a> | ||
<a href="https://github.com/VishalCodez/Discord.js-v13-Handler-With-Mango-Db/network"><img alt="GitHub Forks" src="https://img.shields.io/github/forks/Simpleboy353/REAPER-2.0?style=for-the-badge"></a> | ||
|
||
</p> | ||
|
||
*** | ||
|
||
|
||
## Installation Guide & Requirements | ||
|
||
|
||
**1.** Install [NodeJS v16.6 or Higher](https://nodejs.org/en/) or Higher | ||
- Discord.js v13 (`npm install discord.js@latest`) | ||
- `applications.commands` Must Check Scope Enabled For Your Bot in Developer Portal (For Slash Commands) | ||
- Basic knowledge of JS or Discord.JS | ||
|
||
**2.** Download This Repo And Unzip it | or Git Clone it | ||
|
||
**3.** Fill Everything in **`.env`** | ||
|
||
**4.** After Fill .env run **`setup.bat`** | ||
|
||
**5.** Run Bot Siply With **`start.bat`** | ||
<br/> | ||
|
||
## Configuration | ||
- **Modify The `.env` File And Enter The Required Values** | ||
```javascript | ||
DISCORD_TOKEN = BOT TOKEN HERE | ||
MONGODB_SRV = YOUR MANGO DB URL | ||
``` | ||
## Made With Hate 😈 By [VIshal Codez](https://github.com/VishalCodez) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const { MessageEmbed } = require('discord.js'); | ||
module.exports = { | ||
name: "ping", | ||
description: "check bot ping", | ||
|
||
async execute(interaction) { | ||
const embed = new MessageEmbed() | ||
.setTitle(`${interaction.client.user.username} Ping`) | ||
.setDescription(`Pong ${Math.round(interaction.client.user.client.ws.ping)} Ms`) | ||
.setColor("RANDOM") | ||
interaction.reply({ embeds: [embed] }); | ||
} | ||
}; | ||
|
||
/** | ||
* @INFO | ||
* Coded By Vishal Codez | ||
* @INFO | ||
* Please Don't Forget To Give Credits To Vishal Codez if You Are Using This | ||
* @INFO | ||
* Please Mention Vishal Codez / In Code Streakers, When Using This Code! | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const { MessageEmbed } = require('discord.js'); | ||
const moment = require('moment'); | ||
module.exports = { | ||
name: "uptime", | ||
description: "bot uptime", | ||
|
||
execute(interaction) { | ||
const d = moment.duration(interaction.client.uptime); | ||
const days = (d.days() == 1) ? `${d.days()} Day` : `${d.days()} Days`; | ||
const hours = (d.hours() == 1) ? `${d.hours()} Hour` : `${d.hours()} Hours`; | ||
const minutes = (d.minutes() == 1) ? `${d.minutes()} Minute` : `${d.minutes()} Minutes`; | ||
const seconds = (d.seconds() == 1) ? `${d.seconds()} Second` : `${d.seconds()} Seconds`; | ||
const date = moment().subtract(d, 'ms').format('dddd, MMMM Do YYYY'); | ||
const embed = new MessageEmbed() | ||
.setTitle(`${interaction.client.user.username} Uptime`) | ||
.setDescription(`\`\`\`prolog\n${days}, ${hours}, ${minutes}, and ${seconds}\`\`\``) | ||
.setColor("RANDOM") | ||
interaction.reply({ embeds: [embed] }); | ||
} | ||
}; | ||
/** | ||
* @INFO | ||
* Coded By Vishal Codez | ||
* @INFO | ||
* Please Don't Forget To Give Credits To Vishal Codez if You Are Using This | ||
* @INFO | ||
* Please Mention Vishal Codez / In Code Streakers, When Using This Code! | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// importing logger | ||
const Logger = require("../../lib/logger"); | ||
|
||
// defining ready event function | ||
const readyEvent = (client) => { | ||
Logger.info( | ||
`Logged in as ${client.user.username}. Ready on ${client.guilds.cache.size} servers, for a total of ${client.users.cache.size} users` | ||
); | ||
|
||
client.user.setActivity( | ||
`${client.guilds.cache.size} Servers`, | ||
{ | ||
type: "WATCHING", | ||
} | ||
); | ||
}; | ||
|
||
module.exports = readyEvent; | ||
/** | ||
* @INFO | ||
* Coded By Vishal Codez | ||
* @INFO | ||
* Please Don't Forget To Give Credits To Vishal Codez if You Are Using This | ||
* @INFO | ||
* Please Mention Vishal Codez / In Code Streakers, When Using This Code! | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const Logger = require("../../lib/logger"); | ||
module.exports = async (client, interaction) => { | ||
if (interaction.isCommand()) { | ||
const command = client.slashCommands.get(interaction.commandName); | ||
|
||
try { | ||
command.execute(interaction, interaction.options, client); | ||
} catch (err) { | ||
Logger.error(err); | ||
} | ||
} else { | ||
return interaction.followUp({ content: "An error has occurred!" }); | ||
} | ||
}; | ||
/** | ||
* @INFO | ||
* Coded By Vishal Codez | ||
* @INFO | ||
* Please Don't Forget To Give Credits To Vishal Codez if You Are Using This | ||
* @INFO | ||
* Please Mention Vishal Codez / In Code Streakers, When Using This Code! | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// importing required modules | ||
const fs = require("fs"); | ||
|
||
// defining event handler | ||
const eventHandler = (client) => { | ||
const load_dir = (dir) => { | ||
const event_files = fs | ||
.readdirSync(`./events/${dir}`) | ||
.filter((file) => file.endsWith(".js")); | ||
|
||
for (const file of event_files) { | ||
const event = require(`../events/${dir}/${file}`); | ||
const event_name = file.split(".")[0]; | ||
client.on(event_name, event.bind(null, client)); | ||
} | ||
}; | ||
["client", "guild"].forEach((e) => load_dir(e)); | ||
}; | ||
|
||
module.exports = eventHandler; | ||
/** | ||
* @INFO | ||
* Coded By Vishal Codez | ||
* @INFO | ||
* Please Don't Forget To Give Credits To Vishal Codez if You Are Using This | ||
* @INFO | ||
* Please Mention Vishal Codez / In Code Streakers, When Using This Code! | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// importing required modules | ||
const fs = require("fs"); | ||
|
||
// importing logger | ||
const Logger = require("../lib/logger"); | ||
|
||
// defining slash command handler | ||
const slashCommandHandler = async (client) => { | ||
const arrayOfSlashCommand = []; | ||
const command_files = fs | ||
.readdirSync(`./commands/`) | ||
.filter((file) => file.endsWith(".js")); | ||
for (const file of command_files) { | ||
const command = require(`../commands/${file}`); | ||
if (command.name) { | ||
client.slashCommands.set(command.name, command); | ||
arrayOfSlashCommand.push(command); | ||
} else { | ||
continue; | ||
} | ||
|
||
client.on("ready", async () => { | ||
try { | ||
Logger.debug("Refreshing slash commands..."); | ||
await client.application.commands.set(arrayOfSlashCommand); | ||
Logger.debug("Successfully reloaded slash commands."); | ||
} catch (error) { | ||
Logger.error(error); | ||
} | ||
}); | ||
} | ||
}; | ||
|
||
module.exports = slashCommandHandler; | ||
/** | ||
* @INFO | ||
* Coded By Vishal Codez | ||
* @INFO | ||
* Please Don't Forget To Give Credits To Vishal Codez if You Are Using This | ||
* @INFO | ||
* Please Mention Vishal Codez / In Code Streakers, When Using This Code! | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
const winston = require("winston"); | ||
// Define severity levels. | ||
const levels = { | ||
error: 0, | ||
warn: 1, | ||
info: 2, | ||
http: 3, | ||
debug: 4, | ||
}; | ||
|
||
// This method set the current severity based on | ||
// the current NODE_ENV: show all the log levels | ||
// if the server was run in development mode; otherwise, | ||
// if it was run in production, show only warn and error messages. | ||
const level = () => { | ||
const env = process.env.NODE_ENV || "development"; | ||
const isDevelopment = env === "development"; | ||
return isDevelopment ? "debug" : "warn"; | ||
}; | ||
|
||
// Define different colors for each level. | ||
const colors = { | ||
error: "red", | ||
warn: "yellow", | ||
info: "cyan", | ||
debug: "white", | ||
}; | ||
|
||
// Tell winston to add color | ||
winston.addColors(colors); | ||
|
||
// Define log format. | ||
const format = winston.format.combine( | ||
// write error stack | ||
winston.format.errors({ stack: true }), | ||
// Add the message timestamp with the preferred format | ||
winston.format.timestamp({ format: "DD-MM-YYYY HH:mm:ss:ms" }), | ||
// log must be colored | ||
winston.format.colorize({ all: true }), | ||
// Defining the format of the message showing the level, the timestamp, and the message | ||
winston.format.printf( | ||
(info) => | ||
`${info.level} - ${info.timestamp} : ${info.message} ${info.stack || ""}` | ||
) | ||
); | ||
|
||
// Defining which transports the logger must use to print out messages. | ||
const transports = [ | ||
// Writing error messages in console | ||
new winston.transports.Console(), | ||
// Writing all the error messages in error.log file inside logs folder | ||
new winston.transports.File({ | ||
filename: "logs/error.log", | ||
level: "error", | ||
}), | ||
// Writing all the logs in all.log file inside logs folder | ||
new winston.transports.File({ filename: "logs/all.log" }), | ||
]; | ||
|
||
// Create the logger instance that has to be exported | ||
// and used to log messages. | ||
const Logger = winston.createLogger({ | ||
level: level(), | ||
levels, | ||
format, | ||
transports, | ||
}); | ||
|
||
module.exports = Logger; | ||
/** | ||
* @INFO | ||
* Coded By Vishal Codez | ||
* @INFO | ||
* Please Don't Forget To Give Credits To Vishal Codez if You Are Using This | ||
* @INFO | ||
* Please Mention Vishal Codez / In Code Streakers, When Using This Code! | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
[36minfo[39m - 26-12-2021 01:52:31:5231 : [36mLogged in as Testing Robot. Ready on 4 servers, for a total of 2 users[39m | ||
[37mdebug[39m - 26-12-2021 01:52:31:5231 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 01:52:31:5231 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 01:52:32:5232 : [37mSuccessfully reloaded slash commands.[39m | ||
[37mdebug[39m - 26-12-2021 01:52:32:5232 : [37mSuccessfully reloaded slash commands.[39m | ||
[36minfo[39m - 26-12-2021 01:52:32:5232 : [36mconnected to the database successfully[39m | ||
[36minfo[39m - 26-12-2021 01:53:05:535 : [36mLogged in as Testing Robot. Ready on 4 servers, for a total of 2 users[39m | ||
[37mdebug[39m - 26-12-2021 01:53:05:535 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 01:53:05:535 : [37mRefreshing slash commands...[39m | ||
[36minfo[39m - 26-12-2021 01:53:07:537 : [36mconnected to the database successfully[39m | ||
[37mdebug[39m - 26-12-2021 01:53:32:5332 : [37mSuccessfully reloaded slash commands.[39m | ||
[37mdebug[39m - 26-12-2021 01:53:33:5333 : [37mSuccessfully reloaded slash commands.[39m | ||
[31merror[39m - 26-12-2021 01:56:30:5630 : [31mInvalid connection string "MANGO DB URL"[39m MongoParseError: Invalid connection string "MANGO DB URL" | ||
at new ConnectionString (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongodb-connection-string-url\lib\index.js:82:19) | ||
at parseOptions (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongodb\lib\connection_string.js:213:17) | ||
at new MongoClient (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongodb\lib\mongo_client.js:62:63) | ||
at C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongoose\lib\connection.js:779:16 | ||
at new Promise (<anonymous>) | ||
at NativeConnection.Connection.openUri (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongoose\lib\connection.js:776:19) | ||
at C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongoose\lib\index.js:332:10 | ||
at C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongoose\lib\helpers\promiseOrCallback.js:32:5 | ||
at new Promise (<anonymous>) | ||
at promiseOrCallback (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:10) | ||
[36minfo[39m - 26-12-2021 01:57:08:578 : [36mLogged in as Testing Robot. Ready on 4 servers, for a total of 2 users[39m | ||
[37mdebug[39m - 26-12-2021 01:57:08:578 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 01:57:08:578 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 01:57:09:579 : [37mSuccessfully reloaded slash commands.[39m | ||
[37mdebug[39m - 26-12-2021 01:57:09:579 : [37mSuccessfully reloaded slash commands.[39m | ||
[36minfo[39m - 26-12-2021 01:57:09:579 : [36mconnected to the database successfully[39m | ||
[36minfo[39m - 26-12-2021 02:10:18:1018 : [36mLogged in as Testing Robot. Ready on 4 servers, for a total of 2 users[39m | ||
[37mdebug[39m - 26-12-2021 02:10:18:1018 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 02:10:18:1018 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 02:10:19:1019 : [37mSuccessfully reloaded slash commands.[39m | ||
[37mdebug[39m - 26-12-2021 02:10:19:1019 : [37mSuccessfully reloaded slash commands.[39m | ||
[36minfo[39m - 26-12-2021 02:10:19:1019 : [36mconnected to the database successfully[39m | ||
[31merror[39m - 26-12-2021 02:10:29:1029 : [31mname is not defined[39m ReferenceError: name is not defined | ||
at Object.execute (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\commands\uptime.js:15:16) | ||
at module.exports (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\events\guild\interactionCreate.js:7:15) | ||
at Client.emit (node:events:390:28) | ||
at InteractionCreateAction.handle (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\discord.js\src\client\actions\InteractionCreate.js:73:12) | ||
at Object.module.exports [as INTERACTION_CREATE] (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36) | ||
at WebSocketManager.handlePacket (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\discord.js\src\client\websocket\WebSocketManager.js:350:31) | ||
at WebSocketShard.onPacket (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\discord.js\src\client\websocket\WebSocketShard.js:443:22) | ||
at WebSocketShard.onMessage (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\discord.js\src\client\websocket\WebSocketShard.js:300:10) | ||
at WebSocket.onMessage (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\ws\lib\event-target.js:199:18) | ||
at WebSocket.emit (node:events:390:28) | ||
[36minfo[39m - 26-12-2021 02:23:34:2334 : [36mLogged in as Testing Robot. Ready on 4 servers, for a total of 2 users[39m | ||
[37mdebug[39m - 26-12-2021 02:23:34:2334 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 02:23:34:2334 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 02:23:34:2334 : [37mSuccessfully reloaded slash commands.[39m | ||
[37mdebug[39m - 26-12-2021 02:23:35:2335 : [37mSuccessfully reloaded slash commands.[39m | ||
[36minfo[39m - 26-12-2021 02:23:36:2336 : [36mconnected to the database successfully[39m | ||
[36minfo[39m - 26-12-2021 02:24:57:2457 : [36mLogged in as Testing Robot. Ready on 4 servers, for a total of 2 users[39m | ||
[37mdebug[39m - 26-12-2021 02:24:57:2457 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 02:24:57:2457 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 02:24:57:2457 : [37mSuccessfully reloaded slash commands.[39m | ||
[37mdebug[39m - 26-12-2021 02:24:58:2458 : [37mSuccessfully reloaded slash commands.[39m | ||
[36minfo[39m - 26-12-2021 02:24:58:2458 : [36mconnected to the database successfully[39m | ||
[36minfo[39m - 26-12-2021 02:25:06:256 : [36mLogged in as Testing Robot. Ready on 4 servers, for a total of 2 users[39m | ||
[37mdebug[39m - 26-12-2021 02:25:06:256 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 02:25:06:256 : [37mRefreshing slash commands...[39m | ||
[36minfo[39m - 26-12-2021 02:25:07:257 : [36mconnected to the database successfully[39m | ||
[36minfo[39m - 26-12-2021 02:25:49:2549 : [36mLogged in as Testing Robot. Ready on 4 servers, for a total of 2 users[39m | ||
[37mdebug[39m - 26-12-2021 02:25:49:2549 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 02:25:49:2549 : [37mRefreshing slash commands...[39m | ||
[36minfo[39m - 26-12-2021 02:25:50:2550 : [36mconnected to the database successfully[39m | ||
[37mdebug[39m - 26-12-2021 02:25:58:2558 : [37mSuccessfully reloaded slash commands.[39m | ||
[37mdebug[39m - 26-12-2021 02:25:58:2558 : [37mSuccessfully reloaded slash commands.[39m | ||
[36minfo[39m - 26-12-2021 02:27:32:2732 : [36mLogged in as Testing Robot. Ready on 4 servers, for a total of 2 users[39m | ||
[37mdebug[39m - 26-12-2021 02:27:32:2732 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 02:27:32:2732 : [37mRefreshing slash commands...[39m | ||
[37mdebug[39m - 26-12-2021 02:27:32:2732 : [37mSuccessfully reloaded slash commands.[39m | ||
[36minfo[39m - 26-12-2021 02:27:33:2733 : [36mconnected to the database successfully[39m | ||
[37mdebug[39m - 26-12-2021 02:27:33:2733 : [37mSuccessfully reloaded slash commands.[39m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[31merror[39m - 26-12-2021 01:56:30:5630 : [31mInvalid connection string "MANGO DB URL"[39m MongoParseError: Invalid connection string "MANGO DB URL" | ||
at new ConnectionString (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongodb-connection-string-url\lib\index.js:82:19) | ||
at parseOptions (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongodb\lib\connection_string.js:213:17) | ||
at new MongoClient (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongodb\lib\mongo_client.js:62:63) | ||
at C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongoose\lib\connection.js:779:16 | ||
at new Promise (<anonymous>) | ||
at NativeConnection.Connection.openUri (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongoose\lib\connection.js:776:19) | ||
at C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongoose\lib\index.js:332:10 | ||
at C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongoose\lib\helpers\promiseOrCallback.js:32:5 | ||
at new Promise (<anonymous>) | ||
at promiseOrCallback (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:10) | ||
[31merror[39m - 26-12-2021 02:10:29:1029 : [31mname is not defined[39m ReferenceError: name is not defined | ||
at Object.execute (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\commands\uptime.js:15:16) | ||
at module.exports (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\events\guild\interactionCreate.js:7:15) | ||
at Client.emit (node:events:390:28) | ||
at InteractionCreateAction.handle (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\discord.js\src\client\actions\InteractionCreate.js:73:12) | ||
at Object.module.exports [as INTERACTION_CREATE] (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36) | ||
at WebSocketManager.handlePacket (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\discord.js\src\client\websocket\WebSocketManager.js:350:31) | ||
at WebSocketShard.onPacket (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\discord.js\src\client\websocket\WebSocketShard.js:443:22) | ||
at WebSocketShard.onMessage (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\discord.js\src\client\websocket\WebSocketShard.js:300:10) | ||
at WebSocket.onMessage (C:\Users\Vishal\Desktop\Discord.js-v13-Handler With Mango Db\node_modules\ws\lib\event-target.js:199:18) | ||
at WebSocket.emit (node:events:390:28) |
Oops, something went wrong.