@@ -50,7 +50,7 @@ bot.on('message', (msg) => {
5050 }
5151
5252 let wiki = msg . guild . settings . wiki ;
53- if ( msg . guild . settings . channelOverides ) wiki = msg . guild . settings . channelOverides [ msg . channel . id ] || msg . guild . settings . wiki ;
53+ if ( msg . guild . settings . channelOverrides ) wiki = msg . guild . settings . channelOverrides [ msg . channel . id ] || msg . guild . settings . wiki ;
5454
5555 const mps = [ '**Wiki links detected:**' ] ;
5656 const removeCodeblocks = msg . cleanContent . replace ( / ` { 3 } [ \S \s ] * ?` { 3 } / gm, '' ) ;
@@ -124,14 +124,14 @@ const commands = {
124124 msg . reply ( `Wiki is now set to: ${ wiki } .` ) ;
125125 } ) . catch ( console . error ) ;
126126 } ,
127- cOveride : ( msg , [ wiki ] ) => {
127+ cOverride : ( msg , [ wiki ] ) => {
128128 if ( msg . author . id !== config . admin_snowflake || ! msg . member . hasPermission ( 'ADMINISTRATOR' ) ) {
129- return msg . reply ( 'You are not allowed to change the default wiki of this server .' ) ;
129+ return msg . reply ( 'You are not allowed to override the wiki of this channel .' ) ;
130130 } else if ( msg . channel . id === msg . guild . id ) {
131- return msg . reply ( 'You can\'t overide the default channel of a server.' ) ;
131+ return msg . reply ( 'You can\'t override the default channel of a server.' ) ;
132132 }
133- if ( ! db [ msg . guild . id ] . channelOverides ) db [ msg . guild . id ] . channelOverides = { } ;
134- db [ msg . guild . id ] . channelOverides [ msg . channel . id ] = wiki ;
133+ if ( ! db [ msg . guild . id ] . channelOverrides ) db [ msg . guild . id ] . channelOverrides = { } ;
134+ db [ msg . guild . id ] . channelOverrides [ msg . channel . id ] = wiki ;
135135 return saveDB ( ) . then ( ( ) => {
136136 msg . reply ( `Wiki in this channel is now set to: ${ wiki } .` ) ;
137137 } ) . catch ( console . error ) ;
0 commit comments