Socket
Socket
Sign inDemoInstall

hearthbot-search

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hearthbot-search

A card search module for Hearthbot


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

A attribute search addon for the /r/hearthstone discord cardbot

Instalation

npm i hearthbot-search --save

Getting started

var search = require('hearthbot-search');
// ...
var results = search(searchString); // a string that may contain search trigger words
/*
results = ["card name 1", "card name 2", ...]
*/

Search string:

6 mana 4/4 draw

Result:

["Gadgetztan Auctioneer", "Fight Promoter"]

TODO

  • BIG PROBLEMO: the results for the search are displayed correctly when logged into console but don't get returned???
  • Figure out a way to use the hearthbot-web API to filter results and not have to use a JSON file
  • Launch the updated hearthbot

Supported attributes

  • cost
    • any whole number
  • attack
    • any whole number
  • health
    • any whole number
  • type
    • minion, spell, weapon, hero
  • rarity
    • free, common, rare, epic, legendary
  • class
    • neutral, any of the 9 heroes
  • text
    • a key word (listed below)
Supported key words
  • adapt
  • gain
  • restore
  • holding
  • draw
  • recruit
  • battlecry
  • charge
  • choose one
  • combo
  • counter
  • deathrattle
  • discover
  • enrage
  • freeze
  • immune
  • inspire
  • lifesteal
  • mega-windfury
  • overload
  • poisonous
  • quest
  • silence
  • stealth
  • spell damage
  • taunt
  • secret
  • divine shield
  • windfury

Card object examples

Minion
"40378": {
    "name": "Drakonid Operative",
    "set": "Mean Streets of Gadgetzan",
    "type": "Minion",
    "text": "[x]Battlecry: If you're holding a\\nDragon, Discover a card in\\n_your opponent's deck.",
    "rarity": "Rare",
    "cost": 5,
    "class": "Priest",
    "img": "http:\/\/media.services.zam.com\/v1\/media\/byName\/hs\/cards\/enus\/CFM_605.png",
    "id": 40378,
    "collectible": true,
    "health": 6,
    "attack": 5
}
Spell
"315": {
    "name": "Fireball",
    "set": "Basic",
    "type": "Spell",
    "text": "Deal $6 damage.",
    "rarity": "Free",
    "cost": 4,
    "class": "Mage",
    "img": "http:\/\/media.services.zam.com\/v1\/media\/byName\/hs\/cards\/enus\/CS2_029.png",
    "id": 315,
    "collectible": true
}
Weapon
"401": {
    "name": "Fiery War Axe",
    "set": "Basic",
    "type": "Weapon",
    "text": "",
    "rarity": "Free",
    "cost": 3,
    "class": "Warrior",
    "img": "http:\/\/media.services.zam.com\/v1\/media\/byName\/hs\/cards\/enus\/CS2_106.png",
    "id": 401,
    "collectible": true,
    "attack": 3,
    "health": 2
    }

Keywords

FAQs

Last updated on 16 Apr 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc