Fortnite

Discord bot for StW

4bd581a1a08ad6e0eaa0c51869130801  1200x630 1024x538 - Discord bot for StW
Loading...

(Obligatory delete if not allowed, sorry, etc etc)

So after some time of not really seeing any good Discord bots with a focus on StW I decided to make one myself. I wanted to learn Node.js and this seemed like a good chance to be able to make something with it as I don't like making programs I'm not ever going to use. I've also always wanted to make a Discord bot so this seemed to be perfect.

I had a few requirements I set (and met) for my project:

  • I didn't want to rely on third party APIs. That is to say I wanted to use Epic's API directly, which I do.
  • I didn't want to bog down Epic's servers with unnecessary API calls. Thus, the bot employs caching data (even if it restarts it won't make any calls if it doesn't need to). A few bots for 'the other one' do not do this an actually make API calls every time (ouch). My bot currently only makes 1 API call every 30 minutes (it uses the mission expire time) + any necessary OAUTH calls.
  • I wanted to write most of the code myself. Other than the default node modules I only used 2 third party libraries:
    • discord.js (obviously)
    • qlaffont's fortnite-api (mostly just some simple wrappers for the Epic REST endpoints)
  • I wanted lots of configuration options and a lot of granularity in settings. Not just for the challenge but there's a lot of people playing Fortnite and not everyone is playing for the same reasons, so I wanted to be able to let people configure the bot to do what they wanted/needed. That's the main reason this post is so long.

The bot's name is Firkin. In terms of game features, right now the bot is only a notification system. There's a predetermined list of items you can choose from and the bot will message a channel of your choosing when those items become available in a 4x mission (or any alert for V-bucks). It will only announce once but it can send multiple messages for multiple groups of items (there are currently 3 groups of items, I'll go over that next).

Sample announcement

The first and probably most desired item I'll go over is V-bucks. When you configure the bot to announce v-bucks it will look in every mission for v-bucks and announce any it finds. This is currently the only item that looks in alerts for and isn't limited to just group (4-player) missions.

The rest of the items are only announced if they are available in a group mission. That's because most of the time these items are only "rare" if you are looking for them in group missions. The items are split into 2 types. The first type is "global" and the second type I've named "regional". For "global" items they will announce regardless of where they are located.

Read:  For the people who don't know.

The "region" filter announcements follow your own settings. You can include/exclude any areas you wish. So, if you set Twine and Canny (the default) then it won't announce the items in Plankerton or Stonewood. I made the split because some items don't really matter where they are (i.e. PERK tends to only show up in specific areas, so a region filter makes no sense).

Загрузка...

Right now there's a small pool of items you can filter (toggle on/off). I also created groups of items for convenience so you can easily toggle an entire group of items on/off. Some of the items can be configured by names other than the ones listed, i.e. Pure Drop of Rain works with both "rain" and "drop". In addition to that you can configure items through their groups (so you can do "rareperk on" as well as "perk rare on" for the same effect — for perks you can even just do "perk r on" or "perk e on"). I tried to make it as intuitive as possible once you started to get a feel for it.

Current items you can filter

As a quick overview, here's what the bot does right now:

  • Announces items based on configuration variables set by server manager (anyone with the manage channel permission can use the configuration commands).
  • You can configure…
    • Which items to announce
    • Areas you care about (all, some, one, technically even none but that's pointless lol).
    • Where to send announcements (defaults to unset, so the bot will not announce anything until this is set)
    • The command prefix (via !set firkin-prefix <the prefix>) so you can avoid commands tripping other bots in your server.

What it will do soon:

  • List 4-player alerts via !alerts (default to show only filtered locations)
  • Search missions for specific items via !search
  • These commands will be configurable and will be able to be turned off.

Note: I originally planned to make an option that allowed you to set the bot to ignore certain channels but with the way Discord works you can just set the bot to only be able to speak in the channels you want it to be able to be used in.

Read:  v6.21 Important Links/Undocumented Changes/Bugs Megathread

What it might do in the future:

  • Announce store changes
  • Announce Fortnite news updates (patch notes, etc)
  • BR stuff (I don't play BR so it's not at the top of my list)

Things I want it to do but haven't figured out how to do yet (since the game's REST API isn't documented):

  • Get player profiles (at the very least showing power level and such would be cool)
  • Automatically update nicknames with IGN/PL (requires the above first)

So, there you have it. That's the bot so far. Once I've worked the bugs out I'll make the bot public and anyone will be able to invite it to their server. In the mean time, I'm looking for suggestions for things the bot might do or direction if anyone knows how to do the things I want to but can't do (if you know the API endpoints that'd be very helpful). Also, if you'd like to help test it just message me in Discord and I'll invite you to the bot. You must be an admin on the server to invite a bot. I generally don't accept friend requests from randoms but you can message me if you are in the official Fortnite Discord server. My Discord tag is Ancyker#0001. You can also message me on Reddit of course, or reply to this post.


Original link

Loading...
© Post "Discord bot for StW" for game Fortnite.


Top-10 Best Video Games of 2018 So Far

2018 has been a stellar year for video game fans, and there's still more to come. The list for the Best Games of So Far!

Top-10 Most Anticipated Video Games of 2019

With 2018 bringing such incredible titles to gaming, it's no wonder everyone's already looking forward to 2019's offerings. All the best new games slated for a 2019 release, fans all over the world want to dive into these anticipated games!

You Might Also Like