Programming SableyeBot for Discord

SableyeBot, the competitive Pokemon Discord bot.

Own a server? Click here to add SableyeBot to your Discord server!

In August 2016, /r/stunfisk set up a Discord server. Some talk of a bot came up, so I coded a prototype in an afternoon. Eventually, SableyeBot became the go-to tool for quickly pulling up Pokemon data and sometimes used to meme.

What does it do?

It pulls up informational data in nearly an instant. Use //help for a full command list. Use //help [command name] for detailed info. SableyeBot supports PMs/DMs. A lot of the commands are modeled after TIBot's behavior.

Commands include, but not limited to:

//data - Retrieve information on a Pokemon, move, item, or ability.

//learn - Find how a Pokemon learns a move or the learnset of a Pokemon.

//weak - Get the weakness of a Pokemon (ignoring abilities) or the weaknesses of a Pokemon with a theoretical type combination.

//coverage - Get the type coverage of a Pokemon's STAB typing (ignoring abilities) or the type coverage of up to four types.

//nature - Which stats does "Naive" boost again? Which nature goes with +DEF -SPE again?

//hp - maps IVs to type, and vice versa.

//event - Get event data of a specified Pokemon

//sprite - Retrieve the URL of the Pokemon sprite from the Showdown sprite library. By default, Discord automatically displays these images.

//filter - Retrieve a list of Pokemon that satisfy a list of arguments. Examples include:

//filter move!=swords dance, move=meditate - Get all Pokemon that can learn Meditate but not Swords Dance
//filter type=ghost,move=false swipe,move=thunder wave, threshold>1 - Get all Pokemon that satisfy more than 1 of the following: Has ghost typing, can learn False Swipe, can learn Thunder Wave
//filter move=trick room, spe<50, sort=spe --alola - Get all Alola-friendly Pokemon that learn Trick Room, have a base speed of less than 50, and sorted by speed in ascending order.

Those who are familiar with TIBot can see //filter's similarity with TI's !search command. The reason that I decided to require 'overhead' was in case a Pokemon, Pokemon property, move, and/or ability share a name in the future. Additionally, by default the Pokemon who satisfy the most parameters are listed. Additionally, there is no argument limit; comically long commands can be used to find, for example, the Pokemon that can learn the most multi-hit moves.

A similar command for moves, //filterm, is also included.

~~

Note that I do not plan on supporting information from previous generations. I would need to rewrite everything in order to do that.

If you need to contact me for a feature request/bug report/whatever, you can either post here (I do not frequent Smogon forums often however) leave a message on Github, or drop by the /r/stunfisk Discord as I'm usually online for a few hours every day.

View the source code here. You can plagiarize my code and I won't even care. and anyways I plagiarized someone else

Live long, battle hard, and prosper!
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top