Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Timeouts are bugged #616

Open
1 task done
tavaresmp4 opened this issue Jun 11, 2024 · 12 comments
Open
1 task done

Bug: Timeouts are bugged #616

tavaresmp4 opened this issue Jun 11, 2024 · 12 comments
Assignees
Labels
@akarui/aoi.db this issue/Pr is related to @akarui/aoi.db Issue:Needs Reproduction needs reproduction Type:Bug Something causing unexpected behaviour

Comments

@tavaresmp4
Copy link

tavaresmp4 commented Jun 11, 2024

Bug Type

Function

Bugged Function

... , {
    type: 'interaction',
    prototype: 'button',
    code: `
$interactionReply[${Emojis.Raio}|Caçada **rápida** iniciada! Em \`30 minutos\` você pode usar esse comando de novo e resgatar sua recompensa.;;true]

$editMessage[$interactionData[message.id];{newEmbed:
    {title:$ifAwaited[$getGlobalUserVar[userHuntType]==1;${Emojis.Raio};${Emojis.Barco}]|Caçada em andamento...}
    {description:> Você tem uma caçada **$ifAwaited[$getGlobalUserVar[userHuntType]==1;rápida;longa]** em andamento, volte <t:$truncate[$divide[$getGlobalUserVar[cooldownHunt;$authorID];1000]]:R>!}
    {color:${Cores.Amarelo}}
}{actionRow:
    {button:Ativar lembrete:secondary:huntReminder_$advancedTextSplit[$interactionData[customId];_;2]_$sum[$datestamp;600000]:false:1249838446688731188}
}]

$setTimeout[fastHuntTimeout;1800000;{ "authorID": "$interactionData[author.id]" }]

$setGlobalUserVar[userHuntType;1;$interactionData[author.id]]
$setGlobalUserVar[cooldownHunt;$sum[$datestamp;1800000];$interactionData[author.id]]

$onlyIf[$advancedTextSplit[$interactionData[customId];_;2]==$interactionData[author.id];${Emojis.KiaraRaiva}|Meow! Você não pode usar esse botão! Somente <@$advancedTextSplit[$interactionData[customId];_;2]> pode usar isso!{interaction}{ephemeral}]
$onlyIf[$advancedTextSplit[$interactionData[customId];_;3]>=$datestamp;${Emojis.KiaraSeiLa}|Parece que os dados dessa interação não existem mais. Eu não comi eles! Eu acho...{interaction}{ephemeral}]
$onlyIf[$advancedTextSplit[$interactionData[customId];_;1]==fastHunt;]
    `
}, {
    name: 'fastHuntTimeout',
    type: 'timeout',
    code: `
$setGlobalUserVar[hasHuntReward;true;$timeoutData[authorID]]
    `
} ...

Version of aoi.js

v6.8.0

Version of Node.js

v20.10.0 (LTS)

Excepted Output

VERSION:

  • I'm using version v6.8.0 of aoi.js and previously I used the github version and the same thing happened.

What happend:

  • The timeout didn't run after I restarted, although the wiki says it should work and was fixed in version 6.8.0, but it's not working for me. The only thing I use differently in my bot is that the database I use is mongoDB, using aoi.mongo an unofficial extension.

Relevant log output

Any error on console or chat

Code of Conduct

  • I agree to follow this project's Code of Conduct
@USERSATOSHI
Copy link
Member

USERSATOSHI commented Jun 18, 2024

so it didn't set value to true 30 mins??

@tavaresmp4
Copy link
Author

so it didn't set value to true 30 mins??

yeah, if i restart the bot the timeout dont execute, but if i dont restart it work, so timeouts are broken again...

@Faf4a Faf4a added the Issue:Needs Reproduction needs reproduction label Jun 20, 2024
@atlasfyber
Copy link

atlasfyber commented Jun 22, 2024

I can confirm, if you restart the bot, then previous timeouts never execute, although you can find the on the database as usual. I also use Mongo (once again)

@Mody-0

This comment was marked as off-topic.

@Mody-0

This comment was marked as off-topic.

@atlasfyber
Copy link

That's how json works, try switch to mongo, also I think it's off topic for this issue

@LaurensTheDev
Copy link

yeah, if i restart the bot the timeout dont execute, but if i dont restart it work, so timeouts are broken again...

i can confirm as well

@Leref Leref added @akarui/aoi.db this issue/Pr is related to @akarui/aoi.db Type:Bug Something causing unexpected behaviour labels Jul 4, 2024
@Faf4a
Copy link
Member

Faf4a commented Jul 5, 2024

Does this still happen in the dev version?

@atlasfyber
Copy link

Does this still happen in the dev version?

It's not working on stable version 6.8, is it fixed on dev? Should I try it on dev?

@Faf4a
Copy link
Member

Faf4a commented Jul 5, 2024

i can't reproduce this at all, so no clue

@atlasfyber
Copy link

i can't reproduce this at all, so no clue

Github version or npm (stable)?

@Faf4a
Copy link
Member

Faf4a commented Jul 9, 2024

stable, 6.8.5, works fine for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@akarui/aoi.db this issue/Pr is related to @akarui/aoi.db Issue:Needs Reproduction needs reproduction Type:Bug Something causing unexpected behaviour
Projects
None yet
Development

No branches or pull requests

7 participants