package Ġcom . dong tr onic . di abot . commands . admin . rewards Ċ Ċ import Ġcom . dong tr onic . di abot . commands . Di abot Command Ċ import Ġcom . dong tr onic . di abot . data . Reward DAO Ċ import Ġcom . dong tr onic . di abot . util . Role Utils Ċ import Ġcom . j ag ro sh . j da utilities . command . Command Ċ import Ġcom . j ag ro sh . j da utilities . command . Command Event Ċ import Ġnet . dv 8 tion . j da . core . Embed Builder Ċ import Ġnet . dv 8 tion . j da . core . entities . Role Ċ import Ġorg . slf 4 j . LoggerFactory Ċ import Ġjava . util .* Ċ Ċ class ĠAdmin Reward List Command ( category : ĠCommand . Category , Ġparent : ĠCommand ?) Ġ: ĠDi abot Command ( category , Ġparent ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġlogger Ġ= ĠLoggerFactory . getLogger ( Admin Reward List Command :: class . java ) ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . name Ġ= Ġ" list " ĊĠĠĠĠĠĠĠ Ġthis . help Ġ= Ġ" List Ġconfigured Ġrewards " ĊĠĠĠĠĠĠĠ Ġthis . guild Only Ġ= Ġtrue ĊĠĠĠĠĠĠĠ Ġthis . aliases Ġ= ĠarrayOf (" l ", Ġ" ls ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġexecute ( event : ĠCommand Event ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġconfigured Rewards Ġ= ĠRew ard DAO . getInstance (). getSimple Rewards ( event . guild . id ) ĊĊĠĠĠĠĠĠĠ Ġval Ġrewards Ġ= ĠRole Utils . build Rewards Map ( configured Rewards , Ġevent . guild ) ĊĠĠĠĠĠĠĠ Ġval Ġbuilder Ġ= ĠEmbed Builder () ĊĊĠĠĠĠĠĠĠ Ġbuild Reward Response ( builder , Ġrewards , Ġevent ) ĊĊĠĠĠĠĠĠĠ Ġevent . reply ( builder . build ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġbuild Reward Response ( builder : ĠEmbed Builder , Ġrewards : ĠTreeMap < Role , ĠMutable List < Role >>, Ġevent : ĠCommand Event ) Ġ{ ĊĠĠĠĠĠĠĠ Ġbuilder . setTitle ("${ rewards . size } ĠRew ards Ġfor Ġ${ event . guild . name }") ĊĠĠĠĠĠĠĠ Ġbuilder . setColor ( java . awt . Color . OR ANGE ) ĊĊĠĠĠĠĠĠĠ Ġfor Ġ(( required , Ġreward List ) Ġin Ġrewards ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġreward String Ġ= ĠStringBuilder () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfor Ġ( reward Ġin Ġreward List ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġreward String . append ( reward . name ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġreward String . append (", Ġ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreward String . trim End (',', Ġ' Ġ') ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġbuilder . append Description (" ** ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbuilder . append Description ( required . name ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbuilder . append Description (" ** Ġ=> Ġ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbuilder . append Description ( reward String . toString ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbuilder . append Description ("\ n ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ