Giter VIP home page Giter VIP logo

ffrkbot's Introduction

FFRKBot

Build Status

What

A simple Discord bot using discord.js. Uses a JSON copy of Enlir's FFRK database.

Usage

  • npm install to install the requirements from package.json.
  • Copy config.json.example to config.json and replace the token with your own Discord bot token.
  • Replace the owner with your own Discord ID.
  • node ffrkbot.js to run the bot.
  • To run the bot in the background, run runbot.sh so that the bot respawns if it crashes abnormally.

Google credentials

Google credentials are needed if you're doing stuff with the speedrun functionality. Follow the directions at Google Developer's quickstart and save your credentials.json and client_secret.json to the secrets folder.

License

MIT.

ffrkbot's People

Contributors

brasstax avatar dependabot[bot] avatar drgoonic avatar elninofr avatar pflats avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ffrkbot's Issues

Transition to the new core data sheet

With Enlir retiring their is a new community repository to carry on his work.

Should just require updating the spreadsheet IDs in a few places to 1f8OJIQhpycljDQ8QNDk_va1GJ1u7RVoMaNjFcHH0LKk if I'm not mistaken

Compressing ability information output

The current command output throws out data in this format:

Ability name: Firaja
Description: Magical Attack
Multiplier: 9
Element: Fire
Type: Black Magic
Target: Single
Soul Break charge: 60
Cast time: 1.8

This is quite a few lines, especially for an active chat room. Compressing the lines would make the bot much friendlier on the screen real estate and make it feel less spammy. Something like this:

Ability name: Firaja
Description: Magical Attack
Multiplier: 9 || Element: Fire
Type: Black Magic || Target: Single
Soul Break Charge: 60 || Cast Time: 1.8

Putting names and descriptions on the same line may be a problem because some descriptions are way more complex, but compressing the other data to two entries a line would kill a lot of wasted space.

Refactor and cleanup code

Refactor and clean up the current code for soulbreaks, splitting as many parts as possible into their own functions.

Use ReactionCollector to condense Burst and Brave command outputs

Consider using ReactionCollectors to create a dynamic embed menu for Burst and Brave lookups, to help condense the massive amounts of posts the bot makes in a row. (See: !sidebar command for the Mog Bot). I would volunteer to help but I don't know js enough. I can give you a brief overview of the code flow though.

Add !help and !github

I should add !help and !github to reveal the possible functions. How do I best go about doing that?

Speedrun name request

Ideally would like a command that allows the user to search for their name in the rankings and get a list of their rankings in each category. Could have a more tailored version where they search for their name in a given category as well (or in lieu of the original). Ping me on Discord if worth discussing

Add ,aliases command

Now that you have an aliases database, you'll want to add an aliases command to show what they are.

Add potency to message output

I'll need to add the potency of each ability to the message output. That's exposed in FFRKCentral's API as battle_arg1.

Ideal scenario

From Discord: the ideal scenario is that the bot would provide all of the crunch: potency, element, number of hits, effects, all of that

Speedrun ranking commands

Per earlier conversation, requesting a command that would allow the bot to pull the Top X rankings from the master Google sheet based on category.

The master sheet is linked here: https://docs.google.com/spreadsheets/u/1/d/11gTjAkpm4D3uoxnYCN7ZfbiVnKyi7tmm9Vp9HvTkGpw/htmlview. Can also check our chat history for the shortened URLs, which would provide direct links to each of the three tabs.

There are currently four brackets: 1) 4* Overall, 2) 4* No CSB, 3) CoD Overall, 4) CoD No CSB. The first two have their own tabs, which are divided up based on the boss. Second two are both on the same tab.

Ideally, users would be able to do something like:

!rankings <Overall/No CSB> <# of rankings>

which would then output the rankings as shown in the sheet. If the sheet’s structure is problematic, I’m happy to revise it in whatever way makes things easier for you.

At a certain point, we’ll likely want to add more brackets (e.g. 3* Magicite Overall and No CSB, the new Torments, other special challenges, etc.), so having an infrastructure that makes that easier to add would be great, but defer to you on what would work best.

Also, we’ll probably want to add some kind of help function to guide users on what the proper syntax is since I imagine it might be a little alien to them at first.

Happy to discuss if any questions, if any of this is unreasonable, or if there are things I can do to make this simpler to implement. Again, thank you so much for the help, and hit me up on Discord if you want to talk through anything.

Use RichEmbeds when possible

Use a RichEmbed for the current soulbreak output, and fall back to plaintext if not possible due to permission issues.

brave status

new tab on enlir needs syntax like ,brave character x where x is brave level 1-3

Autocompletion for skills

SkyfireX: when I type .ability snow
NEW MESSAGES
[12:13 AM] SkyfireX: the bot can ask which abilties do you mean

  1. snow 1
  2. snow 2
    [12:13 AM] SkyfireX: and so on
    [12:13 AM] SkyfireX: maybe..

"Pecil" and "Cecil" don't work as aliases

The nicknames for Paladin Cecil and Dark Knight Cecil aren't registering correctly, even though they're in the aliases database. I'll need to examine this one in more detail.

Implement syntax for character burst lookup

You want to avoid looking for specific ability names, nobody will remember those. Something along these lines:

.burst CHARACTER 1|2|3
with the number at the back defaulting to 1 if no entry is given.
ex:
[ .burst Squall 2 ] will give you Squall's BSB2.
[ .burst Zidane ] will give you Zidane's BSB1.

Probably formatted like so:
Burst Name: Stellar Circle 5
Entry: Deal six ranged physical wind attacks to all targets, temporarily lower their wind resistance, and grant Haste and Burst Mode to the user.
Multiplier: ##.#x / 6
Element: None
Command 1: Mug Power (IX)
Effect: Deal physical damage to one target, temporarily lowering its Attack a large amount, and temporarily raise the user's Attack a large amount.
Command 2: Mug Defense (IX)
Effect: Deal physical damage to one target, temporarily lowering its Defense a large amount, and temporarily raise the user's Defense a moderate amount.

Can't look up for details on Superglints.

The ,glint command will only list a character's normal Glints. Superglints like Cloud's won't appear and probably will be under a different command which probably wasn't specified on the bot, unless I'm missing something.

Massively fix codebase

This takes precedence before everything else. I'll want to use discord.js-commando as the base for my code and commands to make it easier to maintain.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.