File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44### Features
551 . Added a search bar and status filters to the community plugins list, which is now sorted by name
661 . The battle log can now be resized by dragging its bottom-left corner, and minimized with the button in its header
7+ 1 . Staff chat commands now show up in chat autocomplete for users with permission to use them
78### Fixes
891 . Fixed some settings pages showing an extra scrollbar when they didn't need one
9101 . Fixed setting notes and other hover text going off the screen
Original file line number Diff line number Diff line change 11{
2+ "ban" : {
3+ "~" : " Ban a user from public chat" ,
4+ "usage" : " <username>"
5+ },
6+ "broadcast" : {
7+ "~" : " Send an announcement to all connected users" ,
8+ "usage" : " <message>"
9+ },
210 "gg" : " Wish your opponent a good game" ,
311 "scroll" : " Scroll the chat back to the bottom" ,
412 "spectate" : {
513 "~" : " Share a spectate link for your current game" ,
614 "usage" : " [text (optional)]" ,
715 "note" : " /spectate [text (optional)]<br/>Output:<br/>You vs Enemy: url [text]"
16+ },
17+ "to" : {
18+ "~" : " Temporarily mute a user and delete their messages" ,
19+ "usage" : " <username> <seconds>"
20+ },
21+ "unban" : {
22+ "~" : " Remove a public chat ban" ,
23+ "usage" : " <username>"
24+ },
25+ "unto" : {
26+ "~" : " Remove a temporary mute" ,
27+ "usage" : " <username>"
828 }
929}
Original file line number Diff line number Diff line change 1+ import { isPriority , self } from 'src/utils/user.js' ;
2+ import { register } from 'src/utils/chatCommands.js' ;
3+ import Translation from 'src/structures/constants/translation.js' ;
4+
5+ function moderation ( command , priority , usage ) {
6+ register ( {
7+ command,
8+ usage : usage && Translation . Command ( `${ command } .usage` ) ,
9+ enabled : ( ) => isPriority ( self ( ) , priority ) ,
10+ } ) ;
11+ }
12+
13+ moderation ( 'broadcast' , 3 , true ) ;
14+ moderation ( 'to' , 4 , true ) ;
15+ moderation ( 'unto' , 4 , true ) ;
16+ moderation ( 'ban' , 3 , true ) ;
17+ moderation ( 'unban' , 3 , true ) ;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export function isStaff(user) {
2828 return isPriority ( user , 6 ) ;
2929}
3030
31- function isPriority ( user , priority ) {
31+ export function isPriority ( user , priority ) {
3232 if ( typeof user ?. mainGroup ?. priority !== 'number' ) throw new Error ( 'Invalid user' ) ;
3333 return user . mainGroup . priority <= priority ;
3434}
You can’t perform that action at this time.
0 commit comments