Add duration argument to mute cmd (#607)

* Add mute expiration and duration argument

* feat: require permission to receive mute alerts

* fix: Missing comma in update-player query
This commit is contained in:
Josua Parks authored and GitHub committed 2025-01-24 22:00:45 -08:00
1 parent 108561b5b9
commit 3cf502d963
15 files changed
+138 -2

No files matched your search

@@ -33,6 +33,7 @@ command.join.description=Join a channel you have previously left.
command.leave.description=Leave a channel that you currently have access to.
command.mute.argument.player=The name of the player to mute.
command.mute.argument.uuid=The UUID of the player to mute.
command.mute.argument.duration=The duration the player will be muted for.
command.mute.description=Mutes players, preventing them from using chat or whispering other players.
command.muteinfo.argument.player=The name of the player.
command.muteinfo.argument.uuid=The UUID of the player.
@@ -92,6 +93,8 @@ command.party.disband.description=Disband your current party.
command.spy.enabled=<green>Spying is now enabled.
command.spy.disabled=<red>Spying is now disabled.
command.spy.description=Allows a player to view all private and channel messages they otherwise wouldn't see.
duration.days=<days>d<hours>h<minutes>m<seconds>s
duration.hours=<hours>h<minutes>m<seconds>s
party.player_joined=<display_name><green> joined your party.
party.player_left=<display_name><green> left your party.
party.cannot_use_channel=<red>You must join a party to use this channel.
@@ -112,7 +115,9 @@ ignore.invalid_target=<red>No target found
ignore.now_ignoring=<green>You are now ignoring <target>
ignore.no_longer_ignoring=<green>You are no longer ignoring <target>
mute.alert.players=<red><target> <red>has been muted
mute.alert.players.temp=<red><target> <red>has been muted for <duration>
mute.alert.target=<red>You have been muted
mute.alert.target.temp=<red>You have been muted for <duration>
mute.cannot_speak=<red>You cannot speak when muted
mute.exempt=<red>That player is exempt from being muted
mute.info.muted=<red><target> <red>is muted
@@ -1,6 +1,7 @@
INSERT{!PSQL: IGNORE} INTO carbon_users(
id,
muted,
muteexpiration,
deafened,
selectedchannel,
displayname,
@@ -13,6 +14,7 @@ INSERT{!PSQL: IGNORE} INTO carbon_users(
) VALUES (
:id,
:muted,
:muteexpiration,
:deafened,
:selectedchannel,
:displayname,
@@ -0,0 +1 @@
ALTER TABLE carbon_users ADD COLUMN muteexpiration BOOLEAN AFTER muted;
@@ -0,0 +1 @@
ALTER TABLE carbon_users ADD COLUMN muteexpiration BOOLEAN AFTER muted;
@@ -0,0 +1 @@
ALTER TABLE carbon_users ADD COLUMN muteexpiration BOOLEAN AFTER muted;
@@ -1,6 +1,7 @@
SELECT
id,
muted,
muteexpiration,
deafened,
selectedchannel,
displayname,
@@ -1,5 +1,6 @@
UPDATE carbon_users SET
muted = :muted,
muteexpiration = :muteexpiration,
deafened = :deafened,
selectedchannel = :selectedchannel,
displayname = :displayname,