reverse the order in which we check for messages

This commit is contained in:
Skylar Grant 2023-01-23 21:18:28 -05:00
parent 91884fd8b9
commit 6f2b16460b
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
{"868542949737246730":{"treeMessageId":"1067246387361751132","treeChannelId":"1067246309448368148","rankMessageId":"1067262633830522903","rankChannelId":"1067246373394714635","treeName":"voidf1sh Development","treeHeight":"8.0","rankings":[{"rank":"11","name":"TreeVana","height":"8126.0","myTree":false,"maybeMyTree":false},{"rank":"12","name":"Crypto Tree","height":"7712.9","myTree":false,"maybeMyTree":false},{"rank":"13","name":"Nyature","height":"7650.0","myTree":false,"maybeMyTree":false},{"rank":"14","name":"KTree","height":"7392.0","myTree":false,"maybeMyTree":false},{"rank":"15","name":"Pandaz Tree","height":"7019.0","myTree":false,"maybeMyTree":false},{"rank":"16","name":"Treesus","height":"6764.6","myTree":false,"maybeMyTree":false},{"rank":"17","name":"Soul Devourer","height":"6666.9","myTree":false,"maybeMyTree":false},{"rank":"18","name":"Handbuch-Baum","height":"6544.0","myTree":false,"maybeMyTree":false},{"rank":"19","name":"Blumekko","height":"6537.7","myTree":false,"maybeMyTree":false},{"rank":"20","name":"SMMO-Forest","height":"6425.0","myTree":false,"maybeMyTree":false}]}}
{"868542949737246730":{"treeMessageId":"1067246387361751132","treeChannelId":"1067246309448368148","rankMessageId":"1067264289578160229","rankChannelId":"1067246387361751132","treeName":"voidf1sh Development","treeHeight":"8.0","rankings":[{"rank":"21","name":"boop","height":"6403.0","myTree":false,"maybeMyTree":false},{"rank":"22","name":"Unfortunate","height":"6219.0","myTree":false,"maybeMyTree":false},{"rank":"23","name":"The Real Treebeard","height":"6124.6","myTree":false,"maybeMyTree":false},{"rank":"24","name":"Treevis Scott","height":"6124.0","myTree":false,"maybeMyTree":false},{"rank":"25","name":"Air Tank","height":"5967.0","myTree":false,"maybeMyTree":false},{"rank":"26","name":"Plant 2 Win","height":"5960.0","myTree":false,"maybeMyTree":false},{"rank":"27","name":"Cult's Wood","height":"5929.0","myTree":false,"maybeMyTree":false},{"rank":"28","name":"TreeIsOnline","height":"5807.0","myTree":false,"maybeMyTree":false},{"rank":"29","name":"Salad's Community Tree","height":"5752.0","myTree":false,"maybeMyTree":false},{"rank":"30","name":"SNS tree","height":"5730.6","myTree":false,"maybeMyTree":false}]}}

View File

@ -21,7 +21,7 @@ module.exports = {
interaction.channel.messages.fetch({ limit: 20 }).then(msgs => {
let treeFound = false;
let rankFound = false;
msgs.forEach(msg => {
msgs.reverse().forEach(msg => {
if (msg.embeds.length > 0) {
if (msg.embeds[0].data.description.includes("Your tree is")) {
treeFound = true;