SlimeCloud / SlimeBot

JDA-Bot um das SlimeCloud Discordteam zu unterstützen
https://discord.gg/slimecloud
GNU Affero General Public License v3.0
6 stars 6 forks source link

Improve badges #196

Closed MineKing9534 closed 8 months ago

MineKing9534 commented 8 months ago

Checklist

Description

This improves badges (currently known as decorations) to support roles. This also adds new list command to the command that allows to show users with a badge an badges of a user. Because this required a feature of a newer JavaUtils version, JavaUtils was updated to the current version.

Migration Guide

Files

Because decorations were renamed to badges (The reason for this is that everyone always called then badges), run environments have to be updated as well:

Database

drop table guild_card_decorations; -- We will give to contributor badge to the contributor role and the booster badge to the booster role afterwards. people should then automatically have the badge if they have the role

alter table card_data rename column decorationstyle to badgestyle;
alter table card_data rename column decorationbordercolor to badgebordercolor;
alter table card_data rename column decorationborderwidth to badgeborderwithh;

Commands

On the discord we have to grant the contributor badge to the contributor role and the booster badge to the booster role

MineKing9534 commented 8 months ago

You can merge this. I thought about the upsert problem again and I don't think it will cause problems here. I'm working on a fix in JavaUtils but this may take a while because it is rather cpmplicated to find a solution that can handle all edge cases.