@@ -71,6 +71,7 @@ export class ThemeCommand {
7171 choices : [
7272 [ "Default" , UserFont . DEFAULT ] ,
7373 [ "HD" , UserFont . HD ] ,
74+ [ "FPack" , UserFont . FPACK ] ,
7475 ] ,
7576 } ) ,
7677 ] ,
@@ -107,7 +108,8 @@ export class ThemeCommand {
107108 const user = context . getUser ( ) ;
108109 const t = context . t ( ) ;
109110
110- if ( ! user ?. uuid ) throw new ErrorMessage ( "verification.requiredVerification" ) ;
111+ if ( ! user ?. uuid )
112+ throw new ErrorMessage ( "verification.requiredVerification" ) ;
111113
112114 const profile = await this . getProfile ( t , "theme" , user ) ;
113115
@@ -125,10 +127,9 @@ export class ThemeCommand {
125127 group : "footer" ,
126128 } )
127129 public message ( context : CommandContext ) {
128- const message = convertColorCodes ( context . option < string > ( "message" ) ) . replace (
129- / § \^ \d \^ / g,
130- ""
131- ) ;
130+ const message = convertColorCodes (
131+ context . option < string > ( "message" )
132+ ) . replace ( / § \^ \d \^ / g, "" ) ;
132133
133134 const length = removeFormatting ( message ) . length ;
134135
@@ -165,7 +166,8 @@ export class ThemeCommand {
165166 } )
166167 public icon ( context : CommandContext ) {
167168 const user = context . getUser ( ) ;
168- if ( ! user ?. uuid ) throw new ErrorMessage ( "verification.requiredVerification" ) ;
169+ if ( ! user ?. uuid )
170+ throw new ErrorMessage ( "verification.requiredVerification" ) ;
169171
170172 const icon = context . option < UserLogo > ( "icon" ) ;
171173
@@ -175,12 +177,16 @@ export class ThemeCommand {
175177 return this . updateField ( context , "footer" , "icon" , icon ) ;
176178 }
177179
178- @SubCommand ( { description : ( t ) => t ( "commands.theme-footer-reset" ) , group : "footer" } )
180+ @SubCommand ( {
181+ description : ( t ) => t ( "commands.theme-footer-reset" ) ,
182+ group : "footer" ,
183+ } )
179184 public async reset ( context : CommandContext ) {
180185 const user = context . getUser ( ) ;
181186 const t = context . t ( ) ;
182187
183- if ( ! user ?. uuid ) throw new ErrorMessage ( "verification.requiredVerification" ) ;
188+ if ( ! user ?. uuid )
189+ throw new ErrorMessage ( "verification.requiredVerification" ) ;
184190
185191 user . footer = {
186192 icon : User . tierToLogo ( user . tier ?? UserTier . NONE ) ,
@@ -201,24 +207,35 @@ export class ThemeCommand {
201207 M extends "theme" | "footer" ,
202208 K extends keyof T ,
203209 T = M extends "theme" ? UserTheme : UserFooter
204- > ( context : CommandContext , mode : M , field : K , value : T [ K ] ) : Promise < IMessage > {
210+ > (
211+ context : CommandContext ,
212+ mode : M ,
213+ field : K ,
214+ value : T [ K ]
215+ ) : Promise < IMessage > {
205216 const user = context . getUser ( ) ;
206217 const t = context . t ( ) ;
207218
208- if ( ! user ?. uuid ) throw new ErrorMessage ( "verification.requiredVerification" ) ;
219+ if ( ! user ?. uuid )
220+ throw new ErrorMessage ( "verification.requiredVerification" ) ;
209221
210222 user [ mode ] = { ...user [ mode ] , [ field ] : value } ;
211223 await this . apiService . updateUser ( user . id , { [ mode ] : user [ mode ] } ) ;
212224
213225 const profile = await this . getProfile ( t , mode , user ) ;
214226
215227 return {
216- content : mode === "theme" ? t ( "config.theme.set" ) : t ( "config.footer.set" ) ,
228+ content :
229+ mode === "theme" ? t ( "config.theme.set" ) : t ( "config.footer.set" ) ,
217230 files : [ { name : `${ mode } .png` , data : profile , type : "image/png" } ] ,
218231 } ;
219232 }
220233
221- private async getProfile ( t : LocalizeFunction , mode : "theme" | "footer" , user : User ) {
234+ private async getProfile (
235+ t : LocalizeFunction ,
236+ mode : "theme" | "footer" ,
237+ user : User
238+ ) {
222239 if ( ! user ?. uuid ) throw new ErrorMessage ( "errors.unknown" ) ;
223240
224241 const [ player , skin , badge , logo , background ] = await Promise . all ( [
@@ -238,7 +255,9 @@ export class ThemeCommand {
238255 badge = { badge }
239256 user = { user }
240257 message = {
241- mode === "theme" ? t ( "config.theme.profile" ) : t ( "config.footer.profile" )
258+ mode === "theme" ?
259+ t ( "config.theme.profile" ) :
260+ t ( "config.footer.profile" )
242261 }
243262 /> ,
244263 getTheme ( user )
0 commit comments