Browse Source

small fixes

Markus-Rost 4 years ago
parent
commit
0bdbead438
2 changed files with 10 additions and 4 deletions
  1. 1 1
      README.md
  2. 9 3
      interactions/inline.js

+ 1 - 1
README.md

@@ -22,7 +22,7 @@ Support server: [https://discord.gg/v77RTk5](https://discord.gg/v77RTk5)
 ## Setup
 ## Setup
 After [inviting](https://discord.com/oauth2/authorize?client_id=461189216198590464&permissions=939904064&scope=bot%20applications.commands) **Wiki-Bot** to your server you need to set the wiki you want to search by default. You do this with the `!wiki settings` command.
 After [inviting](https://discord.com/oauth2/authorize?client_id=461189216198590464&permissions=939904064&scope=bot%20applications.commands) **Wiki-Bot** to your server you need to set the wiki you want to search by default. You do this with the `!wiki settings` command.
 * Change the wiki with `!wiki settings wiki <url>`
 * Change the wiki with `!wiki settings wiki <url>`
-  * Example: `!wiki settings wiki https://minecraft.fandom.com/Minecraft_Wiki`
+  * Example: `!wiki settings wiki https://minecraft.fandom.com/wiki/Minecraft_Wiki`
 * Change the language with `!wiki settings lang <language>`
 * Change the language with `!wiki settings lang <language>`
   * Example: `!wiki settings lang German`
   * Example: `!wiki settings lang German`
 
 

+ 9 - 3
interactions/inline.js

@@ -28,7 +28,9 @@ function slash_inline(interaction, lang, wiki, channel) {
 			if ( response.statusCode !== 204 ) {
 			if ( response.statusCode !== 204 ) {
 				console.log( '- Slash: ' + response.statusCode + ': Error while sending the response: ' + response.body?.message );
 				console.log( '- Slash: ' + response.statusCode + ': Error while sending the response: ' + response.body?.message );
 			}
 			}
-		}, log_error );
+		}, error => {
+			console.log( '- Slash: Error while sending the response: ' + error );
+		} );
 	}
 	}
 	var allowed_mentions = {
 	var allowed_mentions = {
 		parse: ['users']
 		parse: ['users']
@@ -289,7 +291,9 @@ function slash_inline(interaction, lang, wiki, channel) {
 			}
 			}
 			return sendMessage(interaction, message, channel);
 			return sendMessage(interaction, message, channel);
 		} );
 		} );
-	}, log_error );
+	}, error => {
+		console.log( '- Slash: Error while sending the response: ' + error );
+	} );
 }
 }
 
 
 /**
 /**
@@ -313,7 +317,9 @@ function sendMessage(interaction, message, channel) {
 			if ( msg ) allowDelete(msg, ( interaction.member?.user.id || interaction.user.id ));
 			if ( msg ) allowDelete(msg, ( interaction.member?.user.id || interaction.user.id ));
 			return msg;
 			return msg;
 		}, () => {} );
 		}, () => {} );
-	}, log_error );
+	}, error => {
+		console.log( '- Slash: Error while sending the response: ' + error );
+	} );
 }
 }
 
 
 module.exports = {
 module.exports = {