QuadraticBot / QuadraticBot2.0

A simple, user-friendly giveaway bot that uses slash commands and buttons. Invite it to your server with the link below.
https://discord.com/api/oauth2/authorize?client_id=930172444910702653&permissions=150528&scope=applications.commands%20bot
GNU General Public License v3.0
14 stars 10 forks source link

Giveaways not ending #6

Closed Henry-Hiles closed 2 years ago

Henry-Hiles commented 2 years ago

Describe the bug Some giveaways do not end.

To Reproduce Unknown.

Expected behavior For the giveaway to end.

Additional context The error seems to be the following: TypeError: Cannot read properties of undefined (reading 'userId')

ATHDevelopers commented 2 years ago

Are you are using typescript in javascript?

Henry-Hiles commented 2 years ago

No, just javascript.

ATHDevelopers commented 2 years ago

Hmm Whatever is in front of userId is undefined i think

Henry-Hiles commented 2 years ago

Yes i know, the entrant is undefined.

Henry-Hiles commented 2 years ago

What i do not know is why

Henry-Hiles commented 2 years ago

I think i will add some logs in and next time it happens i can check them.

Henry-Hiles commented 2 years ago

Will do tomorrow, thank you for your help.

ATHDevelopers commented 2 years ago

Use optional chaining or add a check.

ATHDevelopers commented 2 years ago

Okie

ATHDevelopers commented 2 years ago

Click me to learn more about optional chaining

Henry-Hiles commented 2 years ago

Use optional chaining or add a check.

I would, but the thing is it should never be undefined.

Henry-Hiles commented 2 years ago

check

Yes thank you, i know.

ATHDevelopers commented 2 years ago

Use optional chaining or add a check.

I would, but the thing is ir should never be undefined.

Okie

ATHDevelopers commented 2 years ago

Is it night for you?

Henry-Hiles commented 2 years ago

Yeah.

ATHDevelopers commented 2 years ago

Ohh okie

ATHDevelopers commented 2 years ago

Tmro then

Henry-Hiles commented 2 years ago

Yep.

ATHDevelopers commented 2 years ago

Bye now :)

Henry-Hiles commented 2 years ago
  • you need to push the changes you made to the original bot

Bye now :)

What?

ATHDevelopers commented 2 years ago

The changes you made like u remove the role giveaway option its still in the "/config" command

Henry-Hiles commented 2 years ago

Oh yeah i forgot to deploy commands, that shouldnt case it though. Anyway goodnight, i will attempt to fix this tomorrow, thank you.

ATHDevelopers commented 2 years ago

Im back

ATHDevelopers commented 2 years ago
Henry-Hiles commented 2 years ago

I could limit it to a hundred i guess...

ATHDevelopers commented 2 years ago

Yes kk

ATHDevelopers commented 2 years ago
Henry-Hiles commented 2 years ago

Yeah coming soon.

ATHDevelopers commented 2 years ago

Do u have a discord server i can join ?

ATHDevelopers commented 2 years ago

Or a test server

Henry-Hiles commented 2 years ago

Not really rn. I have a server where i test the bot while selfhosting though.

ATHDevelopers commented 2 years ago

Can i join?

Henry-Hiles commented 2 years ago

You can, but the bot there is only online when i am testing.

ATHDevelopers commented 2 years ago

Okie invite me

ATHDevelopers commented 2 years ago

Well u find the error yet?

ATHDevelopers commented 2 years ago

U here?

ANNACRAFTE commented 2 years ago

Hello

Henry-Hiles commented 2 years ago

Hello, sorry for the delay, i believe i have now fixed it.

Henry-Hiles commented 2 years ago

Had a very busy week but managed to reproduce after making two alts. I believe you need to three people to join to reproduce

Henry-Hiles commented 2 years ago

The problem was that delete doesnt reindex the array. Using splice now.

Henry-Hiles commented 2 years ago

(If the error persists please reopen)