@@ -27,10 +27,10 @@ const uwflowInfoExecuteCommand: SapphireMessageExecuteType = async (
27
27
// Standardize the course code (i.e. cs 135, CS135, CS 135 becomes cs135 for the GraphQL query)
28
28
const courseCode = < string > courseCodeArg . split ( ' ' ) . join ( '' ) . toLowerCase ( ) ;
29
29
30
- const courseInfo : courseInfo | number = await getCourseInfo ( courseCode ) ;
30
+ const result : courseInfo | number = await getCourseInfo ( courseCode ) ;
31
31
32
32
// If mistyped course code or course doesn't exist
33
- if ( courseInfo === - 1 ) {
33
+ if ( result === - 1 ) {
34
34
const errorDesc = 'Oops, that course does not exist!' ;
35
35
const courseEmbed = new EmbedBuilder ( )
36
36
. setColor ( 'Red' )
@@ -39,14 +39,14 @@ const uwflowInfoExecuteCommand: SapphireMessageExecuteType = async (
39
39
return { embeds : [ courseEmbed ] } ;
40
40
}
41
41
42
- const actualCourseInfo = < courseInfo > courseInfo ;
42
+ const info = < courseInfo > result ;
43
43
44
- const code = actualCourseInfo . code . toUpperCase ( ) ;
45
- const name = actualCourseInfo . name ;
46
- const description = actualCourseInfo . description ;
47
- const liked = ( actualCourseInfo . liked * 100 ) . toFixed ( 2 ) ;
48
- const easy = ( actualCourseInfo . easy * 100 ) . toFixed ( 2 ) ;
49
- const useful = ( actualCourseInfo . useful * 100 ) . toFixed ( 2 ) ;
44
+ const code = info . code . toUpperCase ( ) ;
45
+ const name = info . name ;
46
+ const description = info . description ;
47
+ const liked = ( info . liked * 100 ) . toFixed ( 2 ) ;
48
+ const easy = ( info . easy * 100 ) . toFixed ( 2 ) ;
49
+ const useful = ( info . useful * 100 ) . toFixed ( 2 ) ;
50
50
51
51
const courseEmbed = new EmbedBuilder ( )
52
52
. setColor ( 'Green' )
@@ -66,7 +66,7 @@ const uwflowInfoExecuteCommand: SapphireMessageExecuteType = async (
66
66
export const uwflowInfoCommandDetails : CodeyCommandDetails = {
67
67
name : 'info' ,
68
68
aliases : [ 'information' , 'i' ] ,
69
- description : 'Get info about courses using UWFlow. ' ,
69
+ description : 'Get course information ' ,
70
70
detailedDescription : `**Examples:**
71
71
\`${ container . botPrefix } uwflow info cs135\`
72
72
\`${ container . botPrefix } uwflow information cs246\`
0 commit comments