Skip to content
This repository has been archived by the owner on May 25, 2020. It is now read-only.

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus-Rost committed Jan 6, 2019
1 parent fb2adc5 commit 3a2afdb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a href="https://discordbots.org/bot/523162656346079234"><img align="right" src="https://discordbots.org/api/widget/523162656346079234.svg" alt="Wikia-Bot"></a>
**Wikia-Bot** is a bot for [Discord](https://discordapp.com/) with the purpose to easily link to [FANDOM wikis](https://fandom.wikia.com/explore).
<br>He resolves redirects and follows interwiki links.
<br>**Wikia-Bot** has translations for English, German, French, Polish and Brazilian Portuguese.
<br>**Wikia-Bot** has translations for English, German, French, Polish, Turkish and Brazilian Portuguese.

**Wikia-Bot is not affiliated with FANDOM/Wikia and is an unofficial tool!**

Expand Down
11 changes: 5 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function cmd_settings(lang, msg, args, line) {
}
if ( args.length ) {
if ( args[0] ) args[0] = args[0].toLowerCase();
args[1] = args.slice(1).join(' ').toLowerCase();
args[1] = args.slice(1).join(' ').toLowerCase().replace( /^<(.*)>$/, '$1' );
if ( args[1] && ( args[0] == 'wiki' || args[0] == 'channel' ) ) {
var match = [];
var regex = args[1].match( /^(?:(?:https?:)?\/\/)?([a-z\d-]{1,30})\.fandom\.com(?:\/([a-z-]{1,8}))?(?:\/|$)/ );
Expand Down Expand Up @@ -1223,17 +1223,16 @@ client.on( 'voiceStateUpdate', (oldm, newm) => {

client.on( 'guildCreate', guild => {
console.log( '- Ich wurde zu einem Server hinzugefügt.' );
client.fetchUser(process.env.owner).then( owner => owner.sendMsg( 'Ich wurde zu einem Server hinzugefügt:\n"' + guild.toString() + '" von ' + guild.owner.toString() + ' mit ' + guild.memberCount + ' Mitgliedern.\n(' + guild.id + ')' ), log_error );
} );

client.on( 'guildDelete', guild => {
console.log( '- Ich wurde von einem Server entfernt.' );
client.fetchUser(process.env.owner).then( owner => owner.sendMsg( 'Ich wurde von einem Server entfernt:\n"' + guild.toString() + '" von ' + guild.owner.toString() + ' mit ' + guild.memberCount + ' Mitgliedern.\n(' + guild.id + ')' ), log_error );

if ( !guild.available ) {
console.log( '- Dieser Server ist nicht erreichbar.' );
return;
}
else if ( settings == defaultSettings ) {

if ( settings == defaultSettings ) {
console.log( '- Fehler beim Erhalten bestehender Einstellungen.' );
}
else {
Expand Down Expand Up @@ -1262,7 +1261,7 @@ client.on( 'guildDelete', guild => {
}
else {
settings = Object.assign({}, temp_settings);
console.log( '- Einstellungen erfolgreich aktualisiert.' );
console.log( '- Einstellungen erfolgreich entfernt.' );
}
} );
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fandom-wiki-bot",
"version": "1.0.0",
"version": "1.0.1",
"description": "Wikia-Bot is a bot for Discord with the purpose to easily link to FANDOM wikis. He resolves redirects and follows interwiki links.",
"main": "main.js",
"scripts": {
Expand Down

0 comments on commit 3a2afdb

Please sign in to comment.