oldschoolgg / oldschoolbot

Old School Bot - A fanmade discord bot based on Old School RuneScape (OSRS)
https://www.oldschool.gg/
MIT License
139 stars 122 forks source link

/droprate herbert(pet) giving wrong .txt file #5265

Closed I-am-TURBO closed 1 year ago

I-am-TURBO commented 1 year ago

title says all

SmartSelect_20230815_114259_Discord.jpg

SmartSelect_20230815_114310_Discord.jpg

this is how it should look

SmartSelect_20230815_115127_Discord.jpg

LuxrayElite commented 1 year ago

TLDR: Working as intended

So looking at the code this is due to having a mechanic related to the level of the potion as well as rolling per minute therefore each potion has a unique drop rate.

The text file is due to it exceeding discord character limit for a regular message (2500 or 5000)

The same is true of Baba yaga house pet

Source: https://github.com/oldschoolgg/oldschoolbot/blob/b2a273f785c57bcb21ad01b0d99931d1da0e2767/src/mahoji/commands/droprates.ts#L46-L61

Function: https://github.com/oldschoolgg/oldschoolbot/blob/b2a273f785c57bcb21ad01b0d99931d1da0e2767/src/lib/constants.ts#L791-L797C2

I-am-TURBO commented 1 year ago

TLDR: Working as intended

So looking at the code this is due to having a mechanic related to the level of the potion as well as rolling per minute therefore each potion has a unique drop rate.

The text file is due to it exceeding discord character limit for a regular message (2500 or 5000)

The same is true of Baba yaga house pet

Source: https://github.com/oldschoolgg/oldschoolbot/blob/b2a273f785c57bcb21ad01b0d99931d1da0e2767/src/mahoji/commands/droprates.ts#L46-L61

Function: https://github.com/oldschoolgg/oldschoolbot/blob/b2a273f785c57bcb21ad01b0d99931d1da0e2767/src/lib/constants.ts#L791-L797C2

well that now makes more sense.

now that is explained, SmartSelect_20230815_114259_Discord.jpg

maybe this would be more beneficial? and cause less confusion. just a thought

LuxrayElite commented 1 year ago

All file's outputted have the generic name due to being generated by a function related to the command that calls it. EG bank.txt can be any combination of additional filters/searches/sorts using /bank format:text_Full

Generally text files only seem to be an issue on mobile due to having to download them to see any contents.

It would be nice but then it adds a lot of conditional statements to code each text file name or modifying the current functions🤷