From 912baca81a8982f83b89ae18a75cdb07e257b1c2 Mon Sep 17 00:00:00 2001 From: Enrique Sandoval Date: Fri, 10 May 2019 11:28:24 -0700 Subject: [PATCH] Fixed failing build, updated readme Fixed an issue where the config file was missing the eldwater param This cause the previous build to fail Updated the readme to reflect the current build --- README.md | 75 +++++++++++++++++++++++++++++++++++---------- config_example.ini | 1 + master.db | Bin 610304 -> 610304 bytes models/weapon.py | 10 ++---- 4 files changed, 62 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index d325e14..0bf614a 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,81 @@ # NefBot - A Discord Bot for Dragalia Lost [![Build Status](https://travis-ci.org/eesandoval/NefBot.svg?branch=master)](https://travis-ci.org/eesandoval/NefBot) 1. [About](#about) -2. [Installation](#installation) -3. [Issues](#issues) -4. [License](#license) +2. [Features](#features) +3. [Installation](#installation) +4. [Issues](#issues) +5. [License](#license) # About ## Summary -A simple discord bot used to gather information from the Dragalia Lost mobile game. It is able to pull up information regarding adventurers, dragons, and wyrmprints as well as querying the database it uses to find any of the three with a combination of elements (weapon, element, abilities, etc). +A simple discord bot used to gather information from the Dragalia Lost mobile game. It is able to pull up information from the game including adventurers, dragons, wyrmprints, and weapons. It can also query the database it uses to find any of the three with a combination of elements (weapon, element, abilities, etc). + +# Features ## Searching By Name - + You can search for adventurers, dragons, and wyrmprints with the following command ``` -^(a|d|w) [name] +^(a|d|w|wep) [name] +``` +Where a = adventurers, d = dragons, w = wyrmprints, and wep = weapons. Names are not case sensitive and you can use incomplete names as well. Additionally, if multiple results would be found, the earliest one released in game will be pulled. + +## Searching By Alias + + +Searching for aliases allows for an easy way to search for items without remembering the full name. Out of the box the bot comes with pre-defined names (such as HElly -> Halloween Elisanne) + +## Setting Aliases + + +In addition to searching using an alias, you can also set your own aliases. The command to do so is + +``` +^alias [alias_text] [alias_name] +``` +Where the first parameter will be the text you use to search for, and the second parameter will be the object it refers to. Use quotations around text that has spaces. Repeating this command will edit the alias. + +You can also delete an alias using the same command but omitting the second parameter: +``` +^alias [alias_text] ``` -Where a = adventurers, d = dragons, and w = wyrmprints. Names are not case sensitive and you can use incomplete names as well. Additionally, if multiple results would be found, the earliest one released in game will be pulled. -## Adjusting Bind Level -### 0UB - +## Reactions as Buttons +### Bind Levels + + +Bind levels can now be adjusted using the speaker reactions. The first speaker (with no noise) will denote 0 unbinds + + -### MUB - +The next speaker will denote 2 unbinds for Adventurers and Wyrmprints. For Dragons and Weapons, this is their max unbind as they only change once when unbinding currently -You can now view the adventurers, dragons, or wyrmprints at different bind levels using the reactions at the bottom of the message. Ticking the sound button that is lower will show the item at 0UB, while ticking the sound button at max will show the item at MUB. For adventurers, this bind level is determined by their skills and abilities with three different reactions to view them from level 1, 2, and 3. + -## Full Image View - +The final speaker denotes a max unbind for Adventurers and Wyrmprints. Note that when speaking of unbind levels on Adventurers, it refers to their skill and ability levels (where MUB = max skills and max abilities, 2UB = level 2 skills and max abilites, and 0UB = level 1 skills and level 1 abilities) + +### Full Images + You can also view the full image of these characters and items using the portrait reaction button. + + +Wyrmprints include an additional reaction to view the refined version as well. + +### Upgrade Paths + + +When pulling up weapons, using the fast foward reaction button you can view the upgrade path this weapon can take, as well as the materials needed. + + + +Additionally, as seen above, there exists a rewind reaction to view where this weapon comes from and the materials needed. + ## Querying - + -There exists additionally a query function to find adventurers, dragons, or wyrmprints with specific skills, abilities, rarities, element, weapon, etc. +You can use a query function to find adventurers, dragons, or wyrmprints with specific skills, abilities, rarities, element, weapon, etc. ``` ^query type=(a|w|d) key=value ``` diff --git a/config_example.ini b/config_example.ini index 2c758b9..490f375 100644 --- a/config_example.ini +++ b/config_example.ini @@ -48,6 +48,7 @@ Support = <:unit_support:564117603895869440> [OtherEmojis] Limited = <:limited:571981149497196575> +Eldwater = <:eldwater:576147277861748736> # These values are for server calls # Unless necessary, these should be left alone diff --git a/master.db b/master.db index 0cd5a788ea8c13838418cc6020c2989dc490b043..94f94815e0919bd63ddc2906a262d61a0e97bbc6 100644 GIT binary patch delta 100 zcmZozpxUrNb%Hcw;6xc`#=ype)&$0_2~11)ncJD}ZD$u?;$vjIw^=dZ1f#e}BRe~T vDgz?}LvdzqK~AbdVoqjau|WG*AtoSZ24WTBA)6p5 delta 100 zcmZozpxUrNb%Hdb??f4AM&HJS)&$0_2~11)ncJAYZf6%@;$vjIy;(8f1f#eVgEj*L v1EZ-{iLpXjW>Km_ae01GidOqqAtoSZ24WTBA44E9 diff --git a/models/weapon.py b/models/weapon.py index 3759347..987c807 100644 --- a/models/weapon.py +++ b/models/weapon.py @@ -87,7 +87,7 @@ def _get_weapon(self, db): return False result = result[0] self.weaponid = result[0] - self.elementtype = result[1].lower() + self.elementtype = result[1] self.weapontype = result[2].lower() self.rarity = result[3] self.maxhp = result[4] @@ -141,9 +141,7 @@ def _get_materials(self, weaponid, db): weapon_query_text = ''' SELECT D.WeaponID - , CASE - WHEN ET.Name IS NULL THEN '' - ELSE ET.Name END AS "ElementTypeName" + , lower(ET.Name) AS "ElementTypeName" , WT.Name AS "WeaponTypeName" , D.Rarity , D.MaxHP @@ -220,9 +218,7 @@ def _get_materials(self, weaponid, db): alias_query_text = ''' SELECT W.WeaponID - , CASE - WHEN ET.Name IS NULL THEN '' - ELSE ET.Name END AS "ElementTypeName" + , lower(ET.Name) AS "ElementTypeName" , WT.Name AS "WeaponTypeName" , W.Rarity , W.MaxHP