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

Cleanup + improvements #1

Open
wants to merge 13 commits into
base: development
Choose a base branch
from

Conversation

Elara-Discord-Bots
Copy link

@Elara-Discord-Bots Elara-Discord-Bots commented Apr 15, 2024

Make sure to test this fully.

@TizzySaurus enjoy

  • A messages.txt file will be sent along with the haste link for archive and messageBulkDelete event.
  • Haste creation has been moved to createHaste function so it's easier to manage.
  • Cleaned up the .env.example file to separate which fields is required/optional
  • Updated the readme to fix some details and add links to postgres, redis and nodejs
  • Added the generateDB script to the package.json file (as npm run genDB) so it's easier.
  • Cleaned up a lot of the code where it wasn't used / duplicated
  • Added MESSAGE_ARCHIVE_SIZE .env field to set the amount of messages allowed for archive commands. (by default: 1000)
  • Switched from ${user.discriminator === "0" ? ...} to displayUser function to make things easier. (and not dupe the code over and over again)
  • Added more channel types to the CHANNEL_TYPE_MAP object and moved it to the constants file.
  • Switched out deprecated functions to supported ones
  • Switched the caching of server db settings from caching all guilds in the database to ones only on that shard (moved it to the ready.js file as well)
  • Removed the not used rethink.js file (left over from Logger v2 code ig?)
  • Added IF NOT EXISTS to the generateDB script for messages/guilds

@TizzySaurus
Copy link
Owner

Thanks for this! I'll try and block some time over the weekend to properly review 😀

@AzhamProdLive
Copy link

If needed, I can take some of those commits and try them on my own modification of Logger, as it's always online and I have a few people that can try it for me

@TizzySaurus
Copy link
Owner

Fyi I've made a couple of code changes today (which can be seen here), which includes the IF NOT EXISTS clauses + genDB script + displayUser util (although I called displayUsername) from here.

I may add more features from this PR at some point, but for now I've run out of time.

@AzhamProdLive
Copy link

Fyi I've made a couple of code changes today (which can be seen here), which includes the IF NOT EXISTS clauses + genDB script + displayUser util (although I called displayUsername) from here.

I may add more features from this PR at some point, but for now I've run out of time.

Mind pushing those changes to my fork so I can test and merge them ? I already merged most of those changes on my stable build (just need to work on v2 now)

@TizzySaurus
Copy link
Owner

@AzhamProdLive You can do this yourself by adding my repo as an extra remote to yours:

git remote add tizzylog {url}
git merge tizzylog/development {yourBranchName}

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