Michael-J-Scofield / discord-anti-spam

A simple discord anti spam node.js module to prevent spam on your discord server
MIT License
147 stars 53 forks source link

v13 fix #135

Closed RedSparr0w closed 3 years ago

RedSparr0w commented 3 years ago

Please describe the changes this PR makes and why it should be merged: Updated to work with Discord.js v13

As far as I can tell from my limited testing, this seems to allow it to work with Discord.js v13+

Status and versioning classification:

Scraayp commented 3 years ago

Thank you for the pr.

Have you tested everything and made sure everything work smoothly?

RedSparr0w commented 3 years ago

As far as I could tell everything was working as it should although I haven't used this before so I may have just not noticed some things.

KingTeox commented 3 years ago

As far as I could tell everything was working as it should although I haven't used this before so I may have just not noticed some things.

I think is need to Change the Message.channel.send(here, embed) to Message.channel.send({content: Here, embeds: [embed]})

That Was One of the Things That Changed About V13 https://discord.js.org/#/docs/main/stable/class/TextChannel?scrollTo=send

RedSparr0w commented 3 years ago

As far as I could tell everything was working as it should although I haven't used this before so I may have just not noticed some things.

I think is need to Change the Message.channel.send(here, embed) to Message.channel.send({content: Here, embeds: [embed]})

That Was One of the Things That Changed About V13 discord.js.org/#/docs/main/stable/class/TextChannel?scrollTo=send

I think it only needs the { content: 'my message' } if there is more than just the message AFAIK. But I've updated it to use content anyway, and embeds: [embed]. Also updated channel type check. Should all be fine now 🤞

Scraayp commented 3 years ago

Now please test it. If it's all fine let me know.

Also you want to start making 2.6.0 with me. (You don't need too!)

PuneetGopinath commented 2 years ago

Hello all

A small notice: All SomethingID has been changed to SomethingId in v13 And when exploring the code I saw it checks if message.guild.ownerID === message.author.id where ownerID is no longer a property in djs v13

If you want me to open a pr, let me know

Scraayp commented 2 years ago

I will add it to the 2.6.0 update thanks