Skip to content

planetside-community/voice-channel-population-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Medkit2

A re-imagining of https://github.com/kayteh/medkit-bot

Currently it changes some channel names in Discord based on server pop, continents and alerts, as seen below.

example

Upstream APIs in use

Developing

  • Have node & yarn
  • Run yarn install
  • Run yarn start. It'll generally work.
  • Want it to really work? Add a [vars] to wrangler.toml named BOT_TOKEN, or set it as a secret through Wrangler.
  • Deploy with yarn wrangler publish.

Design Docs

Population

See code

Pulls data from our aggregator API, which averages Saerro, Voidwell, Honu, and Fisu populations.

Continent Locks

See code

Pulls entire map state from Census, filters down to all 3 warpgates for a given continent, and checks if they're all the same owner. E.g. a TR-locked Indar will have 2201, 2202, and 2203 with a TR faction ID.

This may not always keep up with the actual map (like Esamir), so a potential for codegen arises if APIs stablize :)

Alerts

See code

Pulls world_events with type METAGAME from Census API; distinctly not joining with the metagame_events table. Instead, we match the known alert types, Conquest, Max, and Air, by their metagame_events type via codegen. Both of these considerations are due to Census API missing Oshur data.

Census will report alerts in the order they both started and ended, we build an array of active events going from the bottom to the top of the list, and remove them when the instance_id matches another that ended.

About

Live population stats embedded into Discord

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published