[CustomAPI] Pokémon command

NEW VERSION

This is a newer version of the Pokémon command that allows for much more pokemon storage.

I will still be supporting the old pokemon command.
But if you do update to the new version make sure to use new tokens.

Credits

Credit for this being possible is due to @ehsankia and his Quote Api without it I would of had no way of making this command so thank him.
Also, credit to @thegreenofspades for the use of his Pokémon pastebin (Thank You).

What it Does

Keeps track of Pokémon you have caught Xp, Money, Pokéballs, and Level.

Getting tokens for commands

To get the tokens needed for this command please go here https://twitch.center/customapi/quote/generate and find the 8 and 16 digit tokens.
They are after “token=” and before “&data” the 8 digit one is your PUBLIC_TOKEN and is free to share, your 16 digit one is you PRIVATE_TOKEN and should not be shared.

Adding the commands

  • Automatic installation: https://pcatch.potatoeaterlove.workers.dev/

    • Note: It will overwrite commands named !p and _p if you have any named that.
  • First Command: This is the command users will be calling on so I suggest names such as “!p” or “p” but can be called what ever.

$(eval a="$(urlfetch json https://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN&no_id=1)".split(",");PcatchSub1="$(urlfetch json https://pastebin.com/raw/6AfagFQq)".split(",");user="$(user)".replace(/\s+/g,"_");One="$(1)";OneL=One.toLowerCase();Two="$(2)";Three="$(3)";Token="PRIVATE_TOKEN";Dex=`all`;$(urlfetch json https://pastebin.com/raw/erRJGBvb))

Put the alias of this command the same as the second command I suggest _p
Leave userlevel as everyone

  • Second Command: I suggest calling this command _p
$(eval a="$(urlfetch https://twitch.center/customapi/$(1))";b="$(urlfetch https://twitch.center/customapi/$(2)&data=1)";user="$(user)".replace(/\s+/g,"_");Query="$(query)".split(" ");Data="$(urlfetch json https://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN&no_id=1)".split(",");Limit=[20,15,15];$(urlfetch json https://pastebin.com/raw/03KN9k5h))

No alias needed for this command
Leave userlevel as everyone

Optional Commands
  • Third Command: Call this one !pdelete
$(urlfetch https://twitch.center/customapi/delquote?token=PRIVATE_TOKEN&data=$(1))

No alias needed for this one.
Set userlevel to moderator.

  • Fourth Command: Optional this will just let you look at the data can be called whatever.
Check here for the Pokémon data: https://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN

No alias necessary
Just leave userlevel set to everyone

Possible Inputs

  • Buy {Amount}/Max
  • Catch
  • Stats/Inventory
  • Help/[NoInput]
  • Pokemon {Page Number}/Shiny {Page Number}
  • PokeDex/Dex {Page Number}/Special

The Pokédex currently only has 2 generations of Pokémon and was added thanks to @theshreddingmonkey

There may be a special reward for the next 4 people who get to lvl 100 :wink:

Optional Limits/Gen Caps

Limit for Pokémon output length (How many Pokémon are shown when using !p Pokémon/Dex)
  • Limit=[(Pokémon output length),(Pokémon Shiny output length),(Dex output length)];
    • The “Normal” Limits are set at 20, 15, and 15 respectively looking like this:
      • Limit=[20,15,15];
    • The ranges on these numbers are 5-25, 5-20, and 5-20 respectively.
  • To add this to the command add it anywhere in the second command just make sure there are semicolons (`;`) surrounding it on both sides and it comes before the last “$(urlfetch”.
Including and Excluding of Generations (What pokemon you are able to catch)
  • Dex=(Gen numbers that you want);
    • The “Normal” one would look like Dex=12345678; or Dex=`all`;
  • To add this to the command add it anywhere in the first command just make sure there are semicolons (;) surrounding it on both sides and it comes before the last “$(urlfetch”.
    • I have plans to add this option for the second command when the dex has more than two Gens in it but has not as of yet been implemented.

Testing command

If you are looking for a place to test out the command I have it set up on a discord server Here

4 Likes

@potatoeaterlove I love this command want to add it on twitch but am a bit confusas to which command is the actual alias ?

The second command is the command the first one is aliased to.

Is there a way to add a X/250 counter to the response where X is the total number of different pokemon you currently have, as a way to try to actually catch them all?

That’s a good idea I’ll look into it
Btw Merry Christmas/Happy Holidays

1 Like

Thx @potatoeaterlove. If you are going to continue whit this command please let mi know. I do streams to conect with mi son that live in a diferent state, and we love pkm. With this command wi have a blast on stream. Thx a lot. It will be nice to add a battle system between people on chat. That will be sow asome.
Btw happy new year.

1 Like

Firstly I’m glad your enjoying the command. But as for the battle system that most likely isn’t really possible. Though I could try and make a separate command that does something like that. However I can’t make any promises.

1 Like

Thx. If you can do it it will be a blast, i hope is not sow difficult. If not it’s ok. And again thx a toon

1 Like

any idea if this is possible yet? just wondering :smile:

1 Like

I will love to know how to do it. But yes it will be nice

I’m fairly certain it is possible I just haven’t really looked into yet I’ve been busy with school and work lately but I promise I’ll get it up as soon as I can. Also gen3 was recently added btw

1 Like

just gunna bump this quick to get it back on possible radar. still using and loving this command btw, but if this is possible I would even pay to have it worked out.

Sorry I haven’t been actively working on this and there’s not need to pay I just haven’t have time to really work on it.

then is there anyone you know that could be tagged that would also know how to accomplish this perhaps? really wish I was code savvy lol

Well I guess there are two options but neither is ideal at this point I don’t wanna change the code for the secondary command really but I could make an edit to specifically your command that and run a check in the code for it but I think that’s probably pushing the limits of the 250ms timeout at that point especially because of how big the array is because of what I’d have to do with it. Second option is having an ideal array already in the command which can rollout to everyone globally with the command but the problem is I would need to write out every Pokémon with a spacing character in between. So we could go with either one it probably doesn’t hurt to try the first one but second one is more ideal. I can do the first one but if it doesn’t work I’ll be honest I don’t plan on making an array with every Pokémon name but if you really want it and you think that you are willing to do that should that be the case I can make it happen. Should we need to do option to or should you want to I’ll give further instructions on what exactly is required but I’ll leave the choice up to you.

if you think option one is a gamble im willing to try to work on the array for each pokemon for option 2. i might even just take the pastebin used to call the pokemon and make it smaller to only first or second gen to get the count to either 151 or 251 pokemon. I just need to know how youd like the array done, maybe do one or two as an example that i could replicate?

Ok so all I really need from you is the Pokémon names like this:

Poke1|Poke2|Poke3|Pokex

If the name has a space like Mr. Mime it becomes Mr.=Mime other than that capitalization doesn’t technically matter and for a reference of what the Pokémon name looks like if you catch it look here https://pastebin.com/raw/6AfagFQq this is the list that I normally pull from and it requires a lot of shortening to get it to just the name that added with the steps of comparing and stuff is why I think it would probably time out.

Only going to use first two generations for now. Also wasnt sure if there was meant to be a space between each “|” mark or not so I didn’t add one. If there needs to be a space let me know and ill fix it.
https://pastebin.com/raw/EqsJ7SRr

Nope that’s fine I’ll get it added and working ASAP

1 Like

Hey just updating you I should have the Dex working soon only hiccup is that the entire !p command is down rn due to something on pastebins side which should be sorted out soon hopefully but other than that it should be working very soon.

1 Like