Skip to content

Commit

Permalink
Resolve #2, Resolve #3
Browse files Browse the repository at this point in the history
  • Loading branch information
gazmull committed May 27, 2018
1 parent 8af6401 commit 0cfd475
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const { MessageEmbed } = require('discord.js');
const embeds = [];

for (let i = 0; i < 5; ++i)
// You can set per MessageEmbed propeties here instead of globally below
embeds.push(new MessageEmbed().addField('Page', i + 1));

const myImage = message.author.displayAvatarURL();
Expand Down
2 changes: 1 addition & 1 deletion docs/Embeds.html
Original file line number Diff line number Diff line change
Expand Up @@ -4946,7 +4946,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Mar 29 2018 02:38:08 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon May 28 2018 01:53:40 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Embeds.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ <h1 class="page-title">Embeds.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Mar 29 2018 02:38:08 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon May 28 2018 01:53:40 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/FieldsEmbed.html
Original file line number Diff line number Diff line change
Expand Up @@ -2810,7 +2810,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Mar 29 2018 02:38:09 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon May 28 2018 01:53:40 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/FieldsEmbed.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ <h1 class="page-title">FieldsEmbed.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Mar 29 2018 02:38:08 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon May 28 2018 01:53:40 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/PaginationEmbed.html
Original file line number Diff line number Diff line change
Expand Up @@ -2101,7 +2101,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Mar 29 2018 02:38:09 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon May 28 2018 01:53:40 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
7 changes: 3 additions & 4 deletions docs/base_PaginationEmbed.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,10 @@ <h1 class="page-title">base/PaginationEmbed.js</h1>
* @private
*/
async _drawNavigation() {
await this.clientMessage.message.react(this.emojis.back);

if (this.pages > 1) await this.clientMessage.message.react(this.emojis.back);
if (this.pages > 2) await this.clientMessage.message.react(this.emojis.jump);
if (this.pages > 1) await this.clientMessage.message.react(this.emojis.forward);

await this.clientMessage.message.react(this.emojis.forward);
await this.clientMessage.message.react(this.emojis.delete);

this._awaitResponse();
Expand Down Expand Up @@ -424,7 +423,7 @@ <h1 class="page-title">base/PaginationEmbed.js</h1>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Mar 29 2018 02:38:08 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon May 28 2018 01:53:40 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ <h5>Type:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Mar 29 2018 02:38:08 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon May 28 2018 01:53:40 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
3 changes: 2 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ <h3>Under <code>message</code> event</h3></blockquote>
const embeds = [];

for (let i = 0; i &lt; 5; ++i)
// You can set per MessageEmbed propeties here instead of globally below
embeds.push(new MessageEmbed().addField('Page', i + 1));

const myImage = message.author.displayAvatarURL();
Expand Down Expand Up @@ -118,7 +119,7 @@ <h1>License</h1><p>MIT</p></article>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Mar 29 2018 02:38:08 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Mon May 28 2018 01:53:40 GMT+0800 (Taipei Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
5 changes: 2 additions & 3 deletions src/struct/base/PaginationEmbed.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,10 @@ class PaginationEmbed extends MessageEmbed {
* @private
*/
async _drawNavigation() {
await this.clientMessage.message.react(this.emojis.back);

if (this.pages > 1) await this.clientMessage.message.react(this.emojis.back);
if (this.pages > 2) await this.clientMessage.message.react(this.emojis.jump);
if (this.pages > 1) await this.clientMessage.message.react(this.emojis.forward);

await this.clientMessage.message.react(this.emojis.forward);
await this.clientMessage.message.react(this.emojis.delete);

this._awaitResponse();
Expand Down

0 comments on commit 0cfd475

Please sign in to comment.