Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bumped Discord.js to v14.11.0 + discord plugins + log-parser #297

Closed
wants to merge 2 commits into from

Conversation

magicoflolis
Copy link

Background

Been working with SquadJS for 3 months, it's great, but could be greater!

Additions & Changes

core/log-parser/index.js

  • Improved log parser
    • Inspired from uBlock Origin domWatcher. link
    • Requires more testing
  • Fixed Average matching latency being NaN in the log.

squad-server/package.json

  • Bumped discord.js to v14.11.0
  • This will allow additional functionalities along with buttons and interactions.
    • It is difficult to find well written documentation for v12.3.1
    • For me it became easier to learn discord.js with a more recent version. https://discordjs.guide/

squad-server/factory.js

  • Reworked discord section for newer version

squad-server/plugins/*

  • cbl-info.js, added exception for when there is no SteamID within the data ("possible log parser issue or data is not always available during trigger event").
  • discord-base-plugin.js, reworked sendDiscordMessage function, added additional utility functions

squad-server/plugins/discord-*.js

  • Rewrote how plugins use sendDiscordMessage function

While writing this I might have missed a few issues

  • sendDiscordMessage function must be used with EmbedBuilder class.
  • cbl-info.js may only display the default footer and not Powered by SquadJS and the Community Ban List
  • Changes made have been tested & used for the past 3 months.
  • Note, commit files are not the exact same files used for testing.

@werewolfboy13
Copy link
Collaborator

@magicoflolis Has this been tested on an live server?

@werewolfboy13
Copy link
Collaborator

Also more likely for versioning we may ask you to make separate PRs for each major change. That is something I’ll have to read into the bot with.

@lbzepoqo
Copy link
Contributor

Also more likely for versioning we may ask you to make separate PRs for each major change. That is something I’ll have to read into the bot with.

This is a good suggestion by werewolfboy. I would like to test it, but I am hesitant to test these all at once. A separate PR for each major change might make it easier to track and understand with better details.

@magicoflolis
Copy link
Author

Merged changed to a new branch & created a new pull request #300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants