Coder Social home page Coder Social logo

asoiaf-tmg-discord-bot's Introduction

ASOIAF TMG Discord Bot ๐Ÿ‰

Description

This is a Discord bot that will display images for most cards in the game A Song of Ice and Fire: The Tabletop Miniatures Game.

Updating the Bot

Unfortunately I'm no longer playing ASOIAF TMG, but I'm still happy to help the community keep it up to date.

If you'd like to add new cards, please follow these steps:

  • Fork this repository
  • Make your changes to your fork -- it's just editing data in src\asoiaf
  • Create a pull request to merge your changes into this repository's master branch
  • Attach a link to a zip file with your updated images -- I'll upload these to the S3 server that hosts the other images
  • I'll review and merge your changes pretty quickly, within a day or two at most
  • Once I merge your changes to master, the bot will automatically update itself and restart within a few minutes

Installation

Follow this link to add the bot to your server:

https://discord.com/api/oauth2/authorize?client_id=1011134218786574416&permissions=3072&scope=bot

Usage

First, add the bot to your server uses the step(s) above.

Then, just type the following command in any public chat:

!asoiaf [card name]

Example: !asoiaf Lyanna Mormont

You can also use !a as a shorthand.

Example: !a Lyanna Mormont

You can also search by card type: !asoiaf [search parameter] t:[card type]

Available card types:

  • t:commander (shorthand: t:cm, t:c)
  • t:combatunit (shorthand: t:cu)
  • t:attachment (shorthand: t:a)
  • t:noncombatunit (shorthand: t:ncu, t:nc, t:n)
  • t:opponentattachment (shorthand: t:oa, t:o)
  • t:tacticscard (shorthand: t:tactics, t:tactic, t:tc, t:t)
  • t:tacticszone (shorthand: t:tz)
  • t:informationcard (shorthand: t:info, t:i)
  • t:gamemode (shorthand: t:gm)
  • t:mission (shorthand: t:m)
  • t:objective (shorthand: t:ob)
  • t:terrain (shorthand: t:tr)

Example: !a Eddard t:a for all attachments that include "Eddard" in their name

You can also just ask for the front or back of a card:

!a [search parameter] -front or !a [search parameter] -f

!a [search parameter] -back or !a [search parameter] -b

You can also request every tactics card along with the commander.

!a [search parameter] -all !a jaime -all will bring up Jaime's commander card and all of his tactics cards

Issues

To report issues (out of date or missing cards, typos, or any other bugs), please go to the Issues tab and click "New issue".

Development

If I get hit by a bus or something, you can take over this project by:

  • Forking it into your own repository
  • Creating your own bot on Discord via https://discordjs.guide/preparations/setting-up-a-bot-application.html#creating-your-bot
  • Go to the OAuth2 section, General, create a random redirect url (it's required but not used anywhere)
  • Go to URL Generator, check "Bot", then check "Read Messages/View Channels" and "Send Messages"
  • Click Copy to copy the URL and use it to add the bot to your server
  • For running locally, clone .env.sample as .env and set the value of DISCORD_TOKEN to your Discord token (double-quotes around it) -- note that you use !d for local commands instead of !a.
  • For running on the cloud, just ensure DISCORD_TOKEN is set to your bot's token in your cloud provider's environment variables
  • Even non-coders can update the data pretty easily -- it's in the src/asoiaf folder and broken up logically by faction and card type.

Updating Images

  • If you update an existing image URL with a new file, also update IMAGE_CACHE_SUFFIX to be the date of the change to ensure the cache is cleared.

Credits

  • Eric Lang, Michael Shinall, and the rest of the CMON team for a beautiful design
  • Discord's API for allowing me to build a bot
  • ASOIAFBuilder and On The Table Gaming for art and game data
  • My local game group at The Realm, Games and Comics in Brea, California, for their feedback

Legal

This bot is 100% unofficial and is not supported by or affiliated with CMON Games.

A Song of Ice and Fire: Tabletop Miniatures Game logo, CMON, and CMON logo are registered trademarks of CMON Global Limited.

asoiaf-tmg-discord-bot's People

Contributors

nrwillbanks avatar brianchuchua avatar

Stargazers

 avatar Devon Henegar avatar

Watchers

 avatar Devon Henegar avatar Kostas Georgiou avatar

Forkers

nrwillbanks

asoiaf-tmg-discord-bot's Issues

Add quick way to request a particular card type

Feedback from Reddit: https://www.reddit.com/r/asoiafminiaturesgame/comments/wxxi0y/comment/ilwdfws/?utm_source=reddit&utm_medium=web2x&context=3

Users would like to effectively say "Eddard ncu, please." instead of having to go through the cycle of:

  • First searching "Eddard"
  • Getting a response with the list of possible options
  • Typing/copying the option they want
  • Finally getting the card images

I'll need to think through the syntax, since I need to make sure the bot understands which part of the query is the card name and which part is the card type.

I may also need to teach it which cards are Commanders.

Right now the types the bot knows are:

enum CardTypes {
  CombatUnit = 'Combat Unit',
  Attachment = 'Attachment',
  NonCombatUnit = 'Non-Combat Unit',
  OpponentAttachment = 'Opponent Attachment',
  TacticsCard = 'Tactics Card',
}

Being a Commander would be an additional layer on top of that system.

Maybe that's enough? Are there any cards that have Commander and non-Commander versions and are still both Attachments or NonCombatUnits?

I'll ruminate on this.

Baratheon Banners

Can you add Joffrey's "Baratheon Banners" as a searchable card? (Used by his Kingsguard unit)
Screenshot_20220916-210744-238

Consider adding "quiet message" style interaction

Original request:
Can you move some of the bot interaction, confirming which card you want and such to the quiet messages features? Some of the other bots I see do it and it reduces the bot clutter a lot

From alan on SoCal ASOIAF Discord.

Possible issue with R'hollor Queen's Men

From Zosia on Discord: "Hi, I noticed that in your asoiaf tmg bot the unit of "r'hllor queen's men" doesn't have apostrophe in the word "queen's", which might cause some problems with searching them, and I feel like it's not there by the mistake. Just wanted to let you know in case you wanted to change it!"

Mag the Mighty (C)

Mag the Mighty should be tagged as a commander (Relevant only for -all requests, since his Combat Unit is identical to his Commander Combat unit).

Request will return 11 cards since he replaces the whole deck, so that's something to consider.

Pre-Season 1 Cards Used for Baelor & Victarion

The card used for Baelor Blacktyde is his old version with old "To The Last." Current Season 1 card face should be this:
Bealor

Same with Victarion attachment (Season 1 updated "Relentless"):
Vic

Doran Commander not in the Bot

Like the title suggesting, Doran commander is not shown when searching "!a doran".
Only his regular NCU gets shown.

Thanks for making this bot.
We will hopefully implement it at our server soon :D
image
image

Dragonstone Noble Solo

Dragonstone Noble solo combat unit not showing up when queried. (Possibly because it has the same name as Dragonstone Noble attachment?)

Renly Lord Paramount issue

Requesting "-all" for "Renly Lord Paramount" calls up the correct commander attachment, but also all 9 Renly Tactics Cards for all 3 versions of Renly Commanders. (Tested the other 2 Renly Commanders & they call the correct set of cards with "-all".)

Typos

I found a few typos:

  • "High Sparrow - His High Holiness", should be "The High Sparrow - His High Holiness"
  • "Shyra Errol - Landy of Haystack Hall", has an extra "n"
  • "Olenna Tyrell - Olenna Tyrell" should be "Olenna Tyrell - Queen of Thorns"
  • "Alister Thorne - Vindictive Overseer" should be "Alliser Thorne - Vindictive Overseer"
  • "Ranger Vanguards" is missing the "s"
  • "Jorah Mormont - Pentient Betrayer" should be "Jorah Mormont - Penitent Betrayer"
  • "Jorah Mormont - Westerosi Tactician" missing the "i"

Allow searching by abilities

Request from Mock on the ASOIAF Discord.

In principle, would just need to add abilities to each unit and then allow searching by these.

Commander calls

Would be cool if calling a commander (without any additional search words to specify further) brought up their Attachment Card & all 3/4 Tactics Cards by default.

Missing things after S03 update

Bot is missing recently released boxes:

  • Martell Heroes 2
  • Bolton Starter Set (Dreadfort Archers, new NCUs, new Tactic deck and commander cards, new attachment cards, and new cards for old bolton units)
  • Bolton Heroes 1
  • Dreadfort Spearmen
  • Targaryen Brazen Beasts
  • Lannister Golden Cloaks

Multiple things have been also changed in recent update, this is whole changelog of things that got changed, with new tactics card available here in respective factions pdf, and rest of cards available here, or all of them available on asoiaf-stats. There are many errors between files on their website and War Council, so it's likely that some of those cards will be changed in nearest time (or at least we can hope)

More Martell problems

Hey, I dont want to bother you, but I just testet the new Martell cards in the bot.
There I ran into the following issues:

the following cards were missing:

  • Parlay (Doran Martell Tactics card)
  • False Agenda (Doran Martell Tactics card)
  • Oberyn Martell (NCU)

The last one is also tied to the next Problem:
When I searched for "!a oberyn prince t:ncu" or "!a oberyn t:n" the Bot gave me a direct match, but showed me the 4 point Doran NCU.
image
image

Also there is a problem with Areo Hotah - Dutiful Juggernaut:
The displayed front side of the card is a wrong version of him. Its the one from asoiafbuilder.com which is also wrong there...
image

The right version can be found on asoiaf-stats.com/builder.
image

Thanks again for doing this bot and beeing so responsive :D

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.