@@ -88,10 +88,9 @@ pub async fn premium(ctx: Context<'_>) -> CommandResult {
8888 guild_only,
8989 prefix_command,
9090 slash_command,
91- aliases( "activate" ) ,
9291 required_bot_permissions = "SEND_MESSAGES | EMBED_LINKS"
9392) ]
94- pub async fn premium_activate ( ctx : Context < ' _ > ) -> CommandResult {
93+ pub async fn activate ( ctx : Context < ' _ > ) -> CommandResult {
9594 let guild_id = ctx. guild_id ( ) . unwrap ( ) ;
9695 let data = ctx. data ( ) ;
9796
@@ -168,7 +167,7 @@ pub async fn premium_activate(ctx: Context<'_>) -> CommandResult {
168167 slash_command,
169168 required_bot_permissions = "SEND_MESSAGES | EMBED_LINKS"
170169) ]
171- pub async fn list_premium ( ctx : Context < ' _ > ) -> CommandResult {
170+ pub async fn list ( ctx : Context < ' _ > ) -> CommandResult {
172171 let data = ctx. data ( ) ;
173172 let Some ( premium_info) = data. fetch_premium_info ( ctx. http ( ) , ctx. author ( ) . id ) . await ? else {
174173 ctx. say ( "I cannot confirm you are subscribed to premium, so you don't have any premium servers!" ) . await ?;
@@ -191,7 +190,7 @@ pub async fn list_premium(ctx: Context<'_>) -> CommandResult {
191190 let author = ctx. author ( ) ;
192191 let remaining_guilds = premium_info. entitled_servers . get ( ) - premium_guilds;
193192 if embed_desc. is_empty ( ) {
194- embed_desc = Cow :: Borrowed ( "None... set some servers with `/premium_activate `!" ) ;
193+ embed_desc = Cow :: Borrowed ( "None... set some servers with `/premium activate `!" ) ;
195194 }
196195
197196 let footer = aformat ! ( "You have {remaining_guilds} server(s) remaining for premium activation" ) ;
@@ -212,10 +211,9 @@ pub async fn list_premium(ctx: Context<'_>) -> CommandResult {
212211 prefix_command,
213212 slash_command,
214213 guild_only,
215- aliases( "premium_remove" , "premium_delete" ) ,
216214 required_bot_permissions = "SEND_MESSAGES | EMBED_LINKS"
217215) ]
218- pub async fn premium_deactivate ( ctx : Context < ' _ > ) -> CommandResult {
216+ pub async fn deactivate ( ctx : Context < ' _ > ) -> CommandResult {
219217 let data = ctx. data ( ) ;
220218 let author = ctx. author ( ) ;
221219 let guild_id = ctx. guild_id ( ) . unwrap ( ) ;
@@ -240,11 +238,17 @@ pub async fn premium_deactivate(ctx: Context<'_>) -> CommandResult {
240238 Ok ( ( ) )
241239}
242240
243- pub fn commands ( ) -> [ Command ; 4 ] {
244- [
245- premium ( ) ,
246- premium_activate ( ) ,
247- list_premium ( ) ,
248- premium_deactivate ( ) ,
249- ]
241+ pub fn commands ( ) -> [ Command ; 1 ] {
242+ [ Command {
243+ subcommands : vec ! [
244+ Command {
245+ name: "info" . into( ) ,
246+ ..premium( )
247+ } ,
248+ list( ) ,
249+ activate( ) ,
250+ deactivate( ) ,
251+ ] ,
252+ ..premium ( )
253+ } ]
250254}
0 commit comments