0.1.9 • Published 4 years ago
@jeb192004/swgoh-fun v0.1.9
swgoh-fun
swgoh.fun A small set of tools to share between my website, bot, and guild/player data updater for my bot and website.
const fun = require('@jeb192004/swgoh-fun');get guild from swgoh.help api(this has been removed. not needed)
var guild = await fun.get_guild(swapi, allycode);get next allycode form database
var next_allycode = await get_next_allycode(/*mysql conn*/ con, /*guild id*/ id);get allycodes from guild roster and return allycodes array, guild leader name, and array of members waiting to enter guild.
var { allycodes, leader, pending_members_array } = await fun.get_members_allycodes(jb, guild, webhookPendingPlayer);split allycodes array into an array of arrays of allycodes. split into chunks of 10. ex. [10 allycodes,10 allycodes]
var chunked_allycodes_array = await fun.chunk_sbr_players(allycodes)get one or more players form swgoh.help api(this has been removed. not needed)
var player = await get_player_from_api(swapi, allycodes);save 1 or more players to database
await fun.save_player(players_array, jb, cat_list, '');save guild info to alliance description
await jb.fun.save_guild_to_alliance(jb, guild, leader).catch((err) => { console.error(err); });save guild data(from api) to database
await jb.fun.save_guild(jb, guild).catch((err)=>{console.log(err)});0.2.7
4 years ago
0.2.6
4 years ago
0.2.8
4 years ago
0.2.5
4 years ago
0.2.4
4 years ago
0.2.3
4 years ago
0.2.2
4 years ago
0.2.0
4 years ago
0.1.9
4 years ago
0.1.8
4 years ago
0.1.7
4 years ago
0.1.6
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.7
4 years ago
0.0.6
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago
0.0.0
4 years ago