Skip to content

Conversation

phenuop
Copy link

@phenuop phenuop commented Feb 19, 2025

🌟 New Features Update! 🌟

🏑 Daycare System Added!

You can now enable the Daycare System in your bot! πŸŽ‰

πŸ”§ New Config Keys:

  • Daycare β†’ Set to true to enable daycare
  • daycareID β†’ Channel ID for daycare-related messages
  • pokemon β†’ PokΓ©mon to send to daycare (change in daycare)

βœ… Daycare System is fully tested and working!


⏹ AutoStop Feature (Experimental)

  • autostop β†’ Stops incense upon detection of captha (not tested yet! 🚧)

⚠ Use at your own risk! πŸš€


πŸ’‘ Try out these new features and let me know if you find any issues! πŸ› βœ¨

@kyan0045 kyan0045 self-requested a review February 19, 2025 17:59
@kyan0045 kyan0045 self-assigned this Feb 19, 2025
@kyan0045 kyan0045 added the enhancement New feature or request label Feb 19, 2025
@phenuop
Copy link
Author

phenuop commented Feb 19, 2025

Daycare is completely working the insence one u can changed it I havnt tested it

Why u guys dont tell me there is a way to just bypass buttons using -y bruh
@phenuop
Copy link
Author

phenuop commented Feb 19, 2025

Bruh guys why didn't u guys told me we can bypass buttons using -y in incense pausing and resuming bruh

You guys keep saying this and that give this news too :((

@pokegreen
Copy link

Bruh guys why didn't u guys told me we can bypass buttons using -y in incense pausing and resuming bruh

You guys keep saying this and that give this news too :((

your ass shouldnt make pr if you dont have knowledge about bot and how it works

@phenuop
Copy link
Author

phenuop commented Feb 20, 2025

Mf I said in the md auto insence is not tested and can have bugs use at your own risks its ur fault if u can't read blind

Added the missing part autoInsence should work now completely fine
@@ -272,7 +272,283 @@ module.exports = async (client, guildId, message) => {
message.channel.send("<@716390085896962058> sh solosis");
await wait(2000);
message.channel.send("<@716390085896962058> order iv");
} else if (
} else if (config.behavior.Daycare && message.content.includes("in the daycare have produced a")) {
console.log("Daycare condition triggered.");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging is not really needed, if any, then Γ¬t should be using sendLog and only in debug mode, I'll change it in a commit

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ Referring to the many unnecessary logs in the file, (this particular log above will have to be reformatted but can stay)

@@ -272,7 +272,283 @@ module.exports = async (client, guildId, message) => {
message.channel.send("<@716390085896962058> sh solosis");
await wait(2000);
message.channel.send("<@716390085896962058> order iv");
} else if (
} else if (config.behavior.Daycare && message.content.includes("in the daycare have produced a")) {
console.log("Daycare condition triggered.");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ Referring to the many unnecessary logs in the file, (this particular log above will have to be reformatted but can stay)


let collected;
let attempts = 0;
const maxAttempts = 300; // Retry for 5 minutes (300 x 1 sec)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retrying for 5 minutes is outrageous and quite frankly stupid, generally PokΓ©two will respond within the first 15 seconds, even if it needs to filter through 100k pokemon in your account...

`https://verify.poketwo.net/captcha/${client.user.id}`
)
) {
/*const clickYesButton = async (msg) => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why include it if you comment it out anyway

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we need to click button then I found out -y can be used to not use button

console.log("AutoStop enabled: Releasing PokΓ©mon...");
await message.channel.send("<@716390085896962058> inc p all -y");

/*let confirmationMessage = await collectMessage();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again uncommented code that doesnt need to be there

// Declare a global variable for taskid
let globalTaskId;
setTimeout(async () => {
let retries = 5;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you decreasing the amount of retries..?

There are 9 for a reason

}
}
/*let restartConfirmation = await collectMessage();
if (restartConfirmation) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uncommented code for no reason

@kyan0045 kyan0045 changed the title finally daycare addition: automated daycare Feb 23, 2025
Comment on lines +304 to +305
const filter = (m) => m.author.id === "716390085896962058" && m.embeds.length > 0;

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is never even used

} else if (config.behavior.Daycare && message.content.includes("in the daycare have produced a")) {
console.log("Daycare condition triggered.");

const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait() is already imported from src/utils/utils.js, no need to redefine the same function as a variable

@kyan0045
Copy link
Owner

Just to reiterate, the logging is fine for testing, but doesn't have to be there in a production-environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants