-
-
Notifications
You must be signed in to change notification settings - Fork 162
addition: automated daycare #34
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
base: v1.4-beta
Are you sure you want to change the base?
Conversation
Daycare is completely working the insence one u can changed it I havnt tested it |
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 |
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."); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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."); |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
const filter = (m) => m.author.id === "716390085896962058" && m.embeds.length > 0; | ||
|
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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
Just to reiterate, the logging is fine for testing, but doesn't have to be there in a production-environment |
π New Features Update! π
π‘ Daycare System Added!
You can now enable the Daycare System in your bot! π
π§ New Config Keys:
Daycare
β Set totrue
to enable daycaredaycareID
β Channel ID for daycare-related messagespokemon
β 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! π β¨