2.0.1 • Published 6 years ago
bfd-api-alt v2.0.1
Bots for Discord - Alternative and Simplified Wrapper
An API wrapper to Bots for Discord; A more simplified alternative than the official wrapper for Bots For Discord.
NOTE: This is no longer updated, but will stay up. Go here for the official-unofficial maintained version.
However, if you want to have a very olden timey package, then stay here.
To install this package, use npm i bfd-api-alt
(Super useless line since you should already know how to install packages by now...)
What sets this different than the original?
- Simplified function names, and more memorizable function names.
- Explained functions so you know what to do with them.
- Special stuff.
Examples
// First, you have to initialize the package. Obviously.
const package = require('bfd-api-alt');
// AUTH_TOKEN (String) => Your API token from ze site. Required for POST functions, like setting server count. If you are not going to use this (no posting server count), use undefined.
// BOT_ID (String) => Your bot ID for use here. Required for checking self things. Use undefined if this is not going to be for usage.
// [NEW] CLIENT (?Client_Object = undefined) => Your client object. This will be in use for future functions. Currently, it is useless, so just supply undefined. This will NEVER become a required parameter.
// LOGGING (?Boolean = false) => If this should log any POST functions, like posting server count, into the console. There is no way to make custom logs, and no plans are to add that.
const BotList = new package(AUTH_TOKEN, BOT_ID, CLIENT, LOGGING);
// Post your server count to your bot. [Stable]
// SERVER_COUNT (Number) => The server count size. Not needed if you had supplied a valid client object on initialization.
BotList.setCount(SERVER_COUNT);
// Grab a bot on the list... [Stable]
// BOT_ID (String) => The bot ID to fetch.
BotList.fetchBot(BOT_ID);
// ...or the self bot! (Uses the bot ID supplied at Initialization) [Stable]
BotList.fetchSelf();
// Check if a bot is verified or not! (This is the only different from the official one; This one here returns a boolean, not a string "true" or "false") [Stable]
// BOT_ID (String) => The bot ID to check.
BotList.checkVerif(BOT_ID);
// Check if your own bot is verified or not!
BotList.checkVerifSelf();
// Fetch a user that has logged on the site!
// USER_ID (String) => The user ID to check.
BotList.fetchUser(USER_ID);
Update Notes Section
v1 Notes Tab
v1.0.1
- Now has semi-improved return statements so you get a semi-preview of functions (at least in Visual Studio Code?)
- You can now fetch a user if you want to get a user.
- You can now check if your own bot is verified with a simplified function made specifically for that. Thank us later.
- Semi-Improved error usage because SyntaxErrors aren't so great.
And once, there was darkness.
v0.0.0
- Nothing.
- Was.
- Here.
USERS LOVE IT!
10/10 Real reviews from 100% real people. Guaranteed fresh and true.
- Wow, idk who I am, but this is kind of useless. (1 out of 5; RandomJoe666FortniteKoolAid)
- BooooooO! (1 out of 5; HonestOpinions)
- Love it! (5 out of 5; UnpopularOpinionBobby)
Minor Notes
- This is probably not so stable...Meh!
- Did you know: The USERS LOVE IT tab is 0% true? I know, right?