kabirjaipal / JUGNU-MUSIC

Top-notch Music Bot with Buttons, premium Filters, sleek UI, dedicated bot channel support. Built on Distube.JS, Discord.JS, Express.js, and Josh wrapper for SQL and Mongoose
https://jugnu.netlify.app
MIT License
265 stars 367 forks source link

made some changes in events section #64

Closed Saunakghosh10 closed 10 months ago

Saunakghosh10 commented 1 year ago

Changes made in InteractionCreate.js - Updated the import of Permissions from discord.js. Replaced the ApplicationCommandOptionType values with their string equivalents. Updated the PermissionsBitField.resolve method to use a bitwise OR operation (|) for resolving permissions. Replaced the deprecated isContextMenuCommand method with isContextMenu. Updated the condition for handling button and select menu interactions to cover both cases using the logical OR (||) operator.

Changes made in MessageCreate.js -

Updated the import of Permissions and MessageEmbed from discord.js. Replaced the deprecated PermissionsBitField.resolve method with a bitwise OR operation (|) to resolve permissions. Replaced the deprecated guild.members.me.voice.channel with guild.members.cache.get(client.user.id).voice.channel. Replaced the deprecated guild.members.me with guild.members.cache.get(client.user.id). Updated the condition for checking bot permissions to use guild.members.cache.get(client.user.id).permissions. Replaced the deprecated embedBuilder with MessageEmbed. Updated the cooldown function to pass message and command instead of interaction and cmd.

File Changes in ready.js - Updated the console log message to use lowercase for "is online". Changed ActivityType.Watching to ActivityType.WATCHING for consistency. Added comments to indicate the purpose of each section. Modified the function name from updateembed to updateEmbed to follow JavaScript naming conventions.

bugsum commented 1 year ago

Jugnu already uses discord.js@v14 & this PR seems to be adding some outdated & unefficient algorithms & adds vulnerablities, should not be accepted!