소스 검색

Small fixes

Markus-Rost 4 년 전
부모
커밋
3b8e998845
4개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 1 1
      RcGcDb
  2. 2 2
      cmds/get.js
  3. 2 2
      dashboard/login.html
  4. 3 3
      util/wiki.js

+ 1 - 1
RcGcDb

@@ -1 +1 @@
-Subproject commit e57ed16af9c43eb420b3d576468a10ce55fea019
+Subproject commit 0f66a4236f7756acf8cebcae25890c7f5df96f2a

+ 2 - 2
cmds/get.js

@@ -92,13 +92,13 @@ async function cmd_get(lang, msg, args, line, wiki) {
 				else if ( row ) {
 					channellang[1] = row.lang;
 					channelwiki[1] = row.wiki;
-					channelrole[1] = row.role;
+					channelrole[1] = ( row.role ? '`' + row.role + '` <@&' + row.role + '>' : '@everyone' );
 					channelinline[1] = ( row.inline ? 'disabled' : 'enabled' );
 				}
 				else {
 					channellang[1] = defaultSettings.lang;
 					channelwiki[1] = defaultSettings.wiki;
-					channelrole[1] = null;
+					channelrole[1] = '@everyone';
 					channelinline[1] = 'enabled';
 				}
 				

+ 2 - 2
dashboard/login.html

@@ -17,7 +17,7 @@
 		<div id="notices"></div>
 		<div class="description">
 			<h2>Welcome on Wiki-Bot Dashboard.</h2>
-			<p>Wiki-Bot is a Discord bot made to bring Discord servers and MediaWiki wikis together. It helps with linking wiki pages, verifying wiki users, informing about latest changes on the wiki and more.</p>
+			<p>Wiki-Bot is a Discord bot made to bring Discord servers and MediaWiki wikis together. It helps with linking wiki pages, verifying wiki users, informing about latest changes on the wiki and more. <a href="https://wiki.wikibot.de/wiki/Wiki-Bot_Wiki" target="_blank">[More information]</a></p>
 			<p>Here you can change different bot settings for servers you have Manage Server permission on. To begin, you will have to authenticate your Discord account which you can do with this button:</p>
 			<a id="login-button">
 				<img src="https://discord.com/assets/f8389ca1a741a115313bede9ac02e2c0.svg" alt="Discord">
@@ -27,7 +27,7 @@
 			<p>A long time ago, when the world was still figuring out itself, a new faction was born, Gamepedia its name. The kingdom grew quickly, people wanted their own place in the kingdom, it was said the kingdom was a better place than any other kingdoms, which were ridden with very old infrastructure, the taxes enforced by their kings were too high and the kings not too merciful. On the other side, the new kingdom was blossoming, people from all over the world wanted to live there, have their own place there and to do that, they joined existing guilds of people who share their interests. The king here really cared about his most devoted citizens giving them tax exemption status and helping all of them so each of the guilds in the kingdom can prosper and spread the good word about the kingdom.</p>
 			<p>Soon enough the first bigger guilds were joining the kingdom, seeing the greatness of it they joined the kingdom along with their huge tracts. The momentum of growth became a sign of change, a change for the better future. One of the first great King's advisors was Wyn. She was passionate and very talented in all fields needed to manage the kingdom. She enthusiastically  welcomed new guilds and made sure there is nothing on their way to be a fully functioning guilds on Gamepedia.</p>
 			<p>At first the biggest guilds in the kingdom included a guild which consisted of people who devoted their lives to punching the trees with their bare fists, …</p>
-			<a onclick="alert('Not available yet…')">[Read more]</a>
+			<a href="https://wiki.wikibot.de/wiki/Story" target="_blank">[Read more]</a>
 		</div>
 	</div>
 	<div class="scrollbar" id="sidebar">

+ 3 - 3
util/wiki.js

@@ -158,9 +158,9 @@ class Wiki extends URL {
 		querystring.forEach( (value, name) => {
 			link.searchParams.append(name, value);
 		} );
-		let output = decodeURI( link ).replace( /\\/g, '%5C' ).replace( /@(here|everyone)/g, '%40$1' );
-		if ( isMarkdown ) output = output.replace( /[()]/g, '\\$&' );
-		return output + Wiki.toSection(fragment);
+		let output = decodeURI( link ).replace( /\\/g, '%5C' ).replace( /@(here|everyone)/g, '%40$1' ) + Wiki.toSection(fragment);
+		if ( isMarkdown ) return output.replace( /[()]/g, '\\$&' );
+		else return output;
 	}
 
 	/**