aoijs / aoi.js

aoi.js - The most advanced string-based package to create a Discord Bot fast and powerful.
https://aoi.js.org
Apache License 2.0
332 stars 132 forks source link

Bug: reactionCollector #557

Closed TTZADA closed 6 months ago

TTZADA commented 6 months ago

Bug Type

Function

Bugged Function

Code 1:
module.exports = [{
  name: 'test',
  code: `$reactionCollector[$channelID;$get[m];everyone;10m;⏰;sla;true;{"id": "$get[m]"}]
$addMessageReactions[$channelID;$get[m];⏰]
$let[m;$channelSendMessage[$channelID;Reaja;true]]
  `
},{
  name: 'sla',
  type: 'awaited',
  code: `

$setMessageVar[confirm;true;$awaitData[id]]
$sendMessage[ola $awaitData[test]  | $channelID | $authorID | $interactionData[message.id]]
$onlyIf[$getMessageVar[confirm;$awaitData[id]]==false;]
  `
}]

Code 2:
module.exports = [{
  name: 'atm',
  aliases: ['banco', 'saldo', 'conta', 'bal', 'balance', 'money', 'dinheiro', 'dinheiros'],
  $if: 'old',
  code: `
  $reply
⭐ › <@$authorID>, $get[msg] **$numberSeparator[$getGlobalUserVar[sucos;$get[user]];,]** Sucos e você sabia que $get[v] está na posição **#$get[top]**? para ver outros milionários use \`$getGuildVar[prefixx]rank\`.

$if[$globalUserLeaderBoard[sucos;asc;{id};1;1]!=]
$let[top;$replaceText[$replaceText[$checkCondition[$getLeaderboardInfo[sucos;$get[user];global;top]==0];true;$sum[$getLeaderboardInfo[sucos;$globalUserLeaderBoard[sucos;desc;{id};1;1;main];global;top];1]];false;$getLeaderboardInfo[sucos;$get[user];global;top]]]
$else
$let[top;1]
$endif

$let[msg;$replaceText[$replaceText[$checkCondition[$get[user]==$authorID];true;Você atualmente possui];false;$username[$get[user]] atualmente possui]]
 $let[v;$replaceText[$replaceText[$checkCondition[$username[$get[user]]==$username];true;você];false;$username[$get[user]]]]

$let[user;$findUser[$message[1];true]]

$onlyIf[$guildID!=;😪 › Opsie, meus comandos estão apenas disponíveis para servidores, tente usar meus comandos em um]
  `
}]

Note: I'm on version 18 of node.js and in github version (6.7.5)

Version of aoi.js

v6.6.1

Version of Node.js

v16.11.0 (Lowest)

Excepted Output

Well I was trying at first in the first code return the authorID of the person who just clicked on the reaction, but only the author of the person who executed the command appears And in the second code, a leaderboard position appears where it doesn't exist or I'm not

Relevant log output

No response

Code of Conduct

Faf4a commented 6 months ago

Not a bug, your code usage is invalid.

Faf4a commented 5 months ago

@TTZADA apologies, this was indeed a bug and has been fixed in 6.8.