[CustomAPI] Pokémon command

Asked Sep 4, 2020·38 replies·Last activity 2 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

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 @member and his Quote Api without it I would of had no way of making this command so thank him.
Also, credit to @member 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

  • 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

38 replies

  • 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 @Artful Dodo

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

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

@Bouncy Dolphin 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

Thx @member 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.

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.

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

any idea if this is possible yet? just wondering 😄

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

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

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.

thanks so much for taking time to work on this. it doesnt go unnoticed

Thx a lot to work on this. You are a great person. Mi son and i we can't stop using it. Thx a ton

The PokeDex feature has been added. Enjoy! <3

so it works but it trys to put the pastebins worth of pokemon into the chat for some reason lol

image.png

What do you mean I have it set to show 15 at a time do you think it’s to much?

oh i think i just misunderstood. the pokemon listed in the chat arent a reflection of what youve caught but just the list of pokemon in general? I guess that makes good sense, i just figured the command would just include the bottom part of the command showing your total caught out of the 250. my only concern is that the command is used quite often in the stream and i dont want it to seem like a spam wall

That’s fair but I show 20 Pokémon’s with the Pokemon input I can add an option to lower it if you think that’s necessary. By that I mean when you set up the command you can input a value to set it to.

yea having an option to adjust it would be perfect. could dial it in to show enough to be fun but not distract too much from the streams overall chat

Just include

Limit=[PokemonAmountLimit,PokemonShinyAmountLimit,DexLimit];

in the second command the “normal” one would look like

Limit=[20,15,10];

It will take me a second to add the ability for that to actually do anything but I’ll do it whenever I have time.

i appreciate it greatly. you do amazing work.

The Limit has been added

Limit=[5-25,5-12,5-20]

If you think the min or max should be raised or lowered let me know

where inside of the 2nd command "_p" should i add this line of text?

Technically it doesn’t matter as long as it comes before the last urlfetch I added it to the _p command in the original post on this topic it still works if you don’t have it in the command to.

just a quick question. is there a way to adjust the shiny catch rate?

No and I likely won’t implement it in this version I’m currently working on v3 of the command.

alrighty was just wondering... v3?? oh hell yes

Hey, off topic from this but i saw you reply to someone from a couple years ago about setting up a rank command where it will detect whatever game the person is on and when they do !rank it will say that games rank. But im not knowledgeable on scripts. Could you help me? -Thank you

Didn't find your answer? The community is on Discord.

Ask on Discord