Skip to content

Instantly share code, notes, and snippets.

@zaanposni
Last active October 16, 2021 08:41
Show Gist options
  • Select an option

  • Save zaanposni/340d7f3d313867cda877f3147ff04a53 to your computer and use it in GitHub Desktop.

Select an option

Save zaanposni/340d7f3d313867cda877f3147ff04a53 to your computer and use it in GitHub Desktop.
MASZ v2 is finally out!

MASZ 2

MASZ v2 is finally here.
In the following you will find a short instruction on how to update your instance.
Furthermore you can read the patchnotes and my comments on it.

How to update

It is recommended to a backup of your database and uploaded files.
There are examples on how to do so in the scripts directory.

Stop irrelevant containers

docker container stop masz_backend
docker container stop masz_nginx
docker container stop masz_discordbot
docker container stop masz_invitationtracker

Access the mysql cli of your database

docker exec -it masz_db bash
mysql -u root -proot masz

Copy and paste this sql script and press enter.

Leave the mysql cli.

# exit mysql 
exit
# exit docker
exit

git pull the newest changes

git pull

Install dependencies and execute the setup script again

python3 -m pip install rich
python3 setup.py

MASZ containers are now build with GitHub Actions which means you no longer need to build images locally.

Start the docker containers

docker-compose up -d

You might want to clear up the old containers masz_discordbot and masz_invitationtracker.
These are no longer used and integrated in masz_backend!

docker container rm masz_discordbot
docker container rm masz_invitationtracker

Future updates

# pull new containers from github docker registry
docker-compose pull
# restart masz
docker-compose up -d

Please note that MASZ < v2 will no longer be supported.

Patchnotes

Localizations

As it was requested in our discord I have implemented full localizations.
A user can choose his desired language and his timezone. Changing these things updates live and these settings are saved in the browsers cookies.
grafik grafik

You can also change the default language of your instance or on guild level.
For now only english and german are available but new languages can be added easily!
If you want to contribute translations or new languages, follow this guide.

Note that this feature uses browser cookies to save a users preferences, you might want to adjust your privacy notes accordingly!

Prebuilt docker images

Docker images are now built with GitHub Actions and published on the GitHub registry.
This means you no longer need to built masz locally and wait for 10minutes until deployment is done.
You can now pull the image and start the container in seconds!

Custom plugin support

You can write custom plugins for the backend container (which combines automoderation, database, punishments, bot, ...)
For further documentation checkout this readme.
There is a GitHub Discussion about plugin support. Feel free to post what you are doing with this feature so I know how to improve plugin support further. You can also share your plugin with others there!

Improved insights

The insight page has been heavily improved and features ping information for all relevant backend services.
grafik

Adjusted deployment pipeline

The .env file has been moved to the root directory as this is the way docker-compose expect it to be.
The setup.py script has been improved and features new configuration options. It is recommended to execute this before launching your v2 instance.

Logging

The backend logging has been improved and now uses a custom logger. You can now actually track things.
Give it a read! docker logs -f masz_backend

Auditlog

There is now an auditlog which globally logs stuff to discord if defined.
Use this in a private channel only as it may log sensitive information!
grafik

Invitetracking

Invitetracking has been fixed for bot accounts (they dont use invites) and for guilds with vanity urls!

Welcome embed

A welcome embed has been added with useful tips when you register a new guild in MASZ!
grafik

Legal notes

The links in the toolbar for legal notes and terms of service now use the link defined in your discord application settings.

Bot icon

You will now see your application (bot) icon in MASZs top left corner.

Improved caseview

Moderators will now see the usernote if defined while viewing a modcase.
grafik

Modcase restore

Restoring a case from the bin will now reexecute the punishment.

API errors

api errors now return a json with the error message and code

Commands

  • added punish command that combines all punishment types and durations.
  • whois no longer shows roles.
  • version is no longer supported.
  • cases is no longer supported.
  • cleanup no longer supports invite and reaction clear.
  • cleanup now supports a user filter.
  • report now lists urls for attachments.
  • message commands are no longer supported, Slash commands only!

Note that it might take up to one hour for slash commands to sync after your first installation.

Bug fixes

  • the members endpoint now only returns partial member objects and no full objects
  • backend will no longer completely restart if caching fails

Minor features

  • added a description/explanation to the motd feature
  • roles are now sorted based on their correct permission

Thanks

Thanks for reading until here.
MASZ is now older than a year and I am very happy about everyone that joined and still uses MASZ.
Thanks for all your feedback and contributions.
Especially:

  • Bricksmaster - first external user of masz, thanks for your loyality
  • knabb - thanks for your overwhelming feedback and ideas
  • flix - thanks for your ideas and contributions

I will take a small break from MASZ now but no worries there will still be updates and of course bug fixes if needed.
I would appreciate if you could share MASZ with your friends and ask them to use it as well.
With this update and localizations I am confident that a bigger community could be built!

Donations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment