Skip to content
This repository has been archived by the owner on Oct 15, 2019. It is now read-only.

Update 4.5.x #72

Open
wants to merge 59 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
8b6d637
Update stuff to new structure
PwaDesu Aug 28, 2018
4571ba9
Patch 4.4.16
PwaDesu Aug 28, 2018
aab7520
oops forgot that
PwaDesu Aug 28, 2018
df26501
This isn't necessary anymore
PwaDesu Aug 29, 2018
5c5b0f7
Fix IPCHandler.fetchGuild() and daily cooldown not always being added
PwaDesu Aug 29, 2018
804bb45
Add common events to reduce duplications
PwaDesu Aug 29, 2018
723b08f
moar removed duplications
PwaDesu Aug 29, 2018
3bb92d5
Remove more duplications
PwaDesu Aug 29, 2018
899a8ab
try to fix some jsdoc n stuff but >:|
PwaDesu Aug 29, 2018
8c53b9f
actually forgot to remove that :weary:
PwaDesu Aug 29, 2018
8e2d1b3
fix typos
PwaDesu Aug 29, 2018
cb74634
Remove more duplications, add category checks
PwaDesu Aug 29, 2018
7d4fcf9
fix typo
PwaDesu Aug 30, 2018
e97d160
Add generic Command._resolveByExactMatch
PwaDesu Aug 30, 2018
132d227
Refactor user/role/channel resolver methods
PwaDesu Aug 30, 2018
5f0f1c9
Fix message author not being properly replaced
PwaDesu Sep 1, 2018
1898bea
Add more detailled info about required permissions
PwaDesu Sep 1, 2018
dbad4b5
Move user/channel/role resolver methods to BaseContext
PwaDesu Sep 1, 2018
ba244ed
Make music feature available to everyone
PwaDesu Sep 1, 2018
52885cc
Update everything that was using user/role/channel resolver methods
PwaDesu Sep 1, 2018
60c50be
Patch clear
PwaDesu Sep 3, 2018
84dbf74
Start to remove duplicates in greetings/farewells
PwaDesu Sep 4, 2018
32514a0
ESLint compliance
PwaDesu Sep 4, 2018
50e2ff8
Moar refactoring
PwaDesu Sep 4, 2018
4299695
Merge remote-tracking branch 'origin/indev' into indev
PwaDesu Sep 4, 2018
62b965d
Make Command methods used by the message handler static
PwaDesu Sep 4, 2018
31b16b0
Remove more duplications
PwaDesu Sep 4, 2018
51d6edd
ESLint compliance :weary:
PwaDesu Sep 4, 2018
49cd6d2
Make command cooldown sweep an interval instead of a timeout
PwaDesu Sep 5, 2018
2998c16
Remove even moar duplications
PwaDesu Sep 5, 2018
7ee90d7
Put users in the leaderboard even if they don't have any love point
PwaDesu Sep 6, 2018
6acbe88
Add Command.genericEmbed()
PwaDesu Sep 6, 2018
276e2c8
Prevent the resolver from trying to resolve an empty string
PwaDesu Sep 6, 2018
27f6cc9
Remove duplications
PwaDesu Sep 6, 2018
d5b1a95
Remove duplications in iam/iamnot
PwaDesu Sep 6, 2018
81fd375
Replace MusicContext.initialCheck() by MusicContext.categoryCheck()
PwaDesu Sep 6, 2018
2adde08
Remove duplications in skipto, fskipto and removesong
PwaDesu Sep 6, 2018
7b2e21e
Fix queue command not outputting an embed for single-page queues
PwaDesu Sep 6, 2018
b9b3dfc
Remove duplications in skip and skipto
PwaDesu Sep 6, 2018
3f2d8a7
Add Context.hasPerms() and remove a few duplications
PwaDesu Sep 7, 2018
e3d45b5
Remove duplications in slots
PwaDesu Sep 7, 2018
e2ced23
Some fix and remove some duplications in settings
PwaDesu Sep 7, 2018
4446a15
ESLint compliance
PwaDesu Sep 7, 2018
d43f75b
Update DBL widget
PwaDesu Sep 7, 2018
0e00b9f
remove that bad console.log
PwaDesu Sep 7, 2018
cc3a929
Add KitsuWrapper as handler to wrap Kitsu's outrageous API
PwaDesu Sep 19, 2018
3d090f6
Add manga command
PwaDesu Sep 19, 2018
b770a0f
Add attachFiles as global required permission for image commands
PwaDesu Sep 24, 2018
ae3f796
Add trump command
PwaDesu Sep 24, 2018
46e16ef
Add tweet command
PwaDesu Sep 24, 2018
7e11422
feat: add link field to that links to document mentioned on page
Nevvulo Sep 26, 2018
1bf4c4a
feat: clyde image command
Nevvulo Sep 26, 2018
f228629
feat: captcha image command
Nevvulo Sep 26, 2018
9613aff
feat: change my mind image command
Nevvulo Sep 26, 2018
7af7819
feat: jpeg image command
Nevvulo Sep 26, 2018
0b11f01
style: add aliases to new commands and rename variables
Nevvulo Sep 26, 2018
16bf58c
misc stuff
PwaDesu Oct 22, 2018
7f42603
Update whatanime to use trace.moe
PwaDesu Oct 22, 2018
f7e3af7
apparently forgot to commit that
PwaDesu Dec 4, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove duplications in slots
PwaDesu committed Sep 7, 2018
commit e3d45b5498516001e14502fa915d4cf8eb6d6d7c
34 changes: 13 additions & 21 deletions commands/economy/slots.js
Original file line number Diff line number Diff line change
@@ -106,21 +106,9 @@ class Slots extends EconomyCommands {
slotsResults += `----------------------\n`;
slotsResults += resultText;
if (!animatedSlots) {
return context.message.channel.createMessage(noEmbed ? slotsResults.replace(/undefined/gim, '') : {
embed: {
title: ":slot_machine: Slots",
description: slotsResults.replace(/undefined/gim, ''),
color: context.client.config.options.embedColor.generic
}
});
return context.message.channel.createMessage(noEmbed ? slotsResults.replace(/undefined/gim, '') : this.genericSlotsResults(slotsResults));
} else {
return animatedSlots.edit(noEmbed ? slotsResults.replace(/undefined/gim, '') : {
embed: {
title: ":slot_machine: Slots",
description: slotsResults.replace(/undefined/gim, ''),
color: context.client.config.options.embedColor.generic
}
});
return animatedSlots.edit(noEmbed ? slotsResults.replace(/undefined/gim, '') : this.genericSlotsResults(slotsResults));
}
}

@@ -133,13 +121,7 @@ class Slots extends EconomyCommands {
slotsResults += `>| ${animatedEmote} | ${animatedEmote} | ${animatedEmote} |<\n`;
slotsResults += `-| ${animatedEmote} | ${animatedEmote} | ${animatedEmote} |-\n\n`;
slotsResults += `----------------------\n`;
const animatedSlots = await context.message.channel.createMessage(noEmbed ? slotsResults.replace(/undefined/gim, '') : {
embed: {
title: ":slot_machine: Slots",
description: slotsResults.replace(/undefined/gim, ''),
color: context.client.config.options.embedColor.generic
}
});
const animatedSlots = await context.message.channel.createMessage(noEmbed ? slotsResults.replace(/undefined/gim, '') : this.genericSlotsResults(slotsResults));
setTimeout(() => {
return resolve(animatedSlots);
}, 2000);
@@ -192,6 +174,16 @@ class Slots extends EconomyCommands {
}
return targetFunc(context, slots, conditionalVariantSuccess ? coinsChange : (eventCoinsChangeRate > 0 ? coinsChange + eventCoinsChange : coinsChange - eventCoinsChange), resultText, animatedSlots);
}

genericSlotsResults(results) {
return {
embed: {
title: ":slot_machine: Slots",
description: results.replace(/undefined/gim, ''),
color: this.client.config.options.embedColor.generic
}
}
}
}

module.exports = Slots;