Coder Social home page Coder Social logo

amity / dnd-bot Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.57 MB

Discord bot to help with DMing and playing DnD: providing on-the-fly spell and creature information, tracking instances and monsters, and more.

Home Page: https://discordapp.com/oauth2/authorize?&client_id=523218118873710630&scope=bot&permissions=8

TypeScript 100.00%

dnd-bot's Introduction

DnD Bot

UPDATE: With Discord sunsetting Gateway v5, the Discord.io library this bot is built on is no longer functioning, and cannot be revived without refactoring to a different core library. As a result, the bot has been deprecated for the time being. Thank you for using SpellBot!


A simple bot to help players and DMs with managing 5e DnD games. Built with npm start (compiles the TS, copies all other files, and runs out of /built destination folder), but users should interact with it as a Discord bot, which can be added to your server by following the instructions below.

The bot can be messaged directly, or called in any server which it has been granted access to.

To add to your server:

Visit https://discord.com/oauth2/authorize?&client_id=523218118873710630&scope=bot&permissions=8 and authorize the bot to enter your server. That's it! You can also message it directly, rather than in a server.

Current commands:

Parentheses indicate the query inside should be replaced with user input; brackets indicate optional parameters. (The parentheses and brackets themselves should not be included in issued commands.)

Lookup:

  • /DM me: Toggles whether the user is marked as a DM, allowing them to look up monsters.
  • /spell (spellName) will return information for the given spell.
  • /monster [--full ](monsterType) will return information for the given monster. Please note that in most circumstances, players should not necessarily have access to all of this information, so this command should typically be reserved for DMs' DMs. If the user is not marked as a DM, monster lookup will be unavailable.
    • Including --full will also print detailed information about the monster's actions and abilities.

Instancing:

  • /spawn (monsterType)[*num]: Spawns one monster of type monsterType in the current instance, or multiple monsters of the same type by appending *num. (e.g. /spawn Goblin, or /spawn Goblin*3.)
  • /monsters: Prints all living monsters currently spawned in the user's instance, and their HPs.
  • /initiative: Prints sorted initiative for all living mobs.
  • /initiative roll (name) (modifier): Sets the initiative for a creature (or creates a new creature, if not existing) via a random d20 roll combined with the specified modifier. For example, /initiative roll Taliyah -3. Additional creatures can be appended separated by a space.
  • /initiative set (name) (value): Functions the same as /initiative roll, but by setting values directly rather than rolling for them.
  • /dmg (num) (monsterName): Deals num damage to monsterName. Additional monsters to be damaged can be appended separated by a space, e.g. /dmg 6 Goblin1 Goblin3. Monsters brought below 0 HP by damage are destroyed.
  • /status (statusName) (monsterName): Inflicts statusName status on monsterName. Additional monsters to be afflicted can be appended separated by a space, e.g. /status paralyzed Goblin1 Goblin3. Note that this allows any user-entered "status", so you could also use this to keep notes on monsters.
  • /clear: Clears all monsters in the player's instance.
  • /help displays a quick informational message.

Planned expansions:

  • Printing the DM-ness of all users in a channel (or just making them all non-DM but the one issuing the command.)
  • Character management
  • (Long shot): ASCII GUI for field representation
  • TBA

dnd-bot's People

Contributors

amity avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar

dnd-bot's Issues

Expanded DM toggling/controls

Purpose: To ensure that players that aren't supposed to be DMs, aren't, at the start of a session.

I'm open to ideas on the implementation, I was thinking either:

  • Command that prints a list of all DMs in the channel (so they can be told to change)
  • Command that makes the user a DM, and all other users in the channel/with a role non-DMs.

Potentially, we could also have an automatic function to setup the bot to post in a specific channel if a user makes themself a DM in direct message (to avoid people using DM tools on the side), but that seems a bit excessive.

Level-Up Tools

Tracking characters' levels, and then helping them enhance their character and abilities on level-up.

Character Creation/Import

Should be able to create characters, or import their information easily.

This is challenging, in that going for a full-scale implementation a la DnD Beyond seems incredibly ambitious.
Optimally, users would be able to import their characters from outside so that they could be managed within Discord.

That said, I'm not certain such a function would get much use unless this bot becomes much more widely used.

ASCII GUI for field representation

Bit of a long-shot, but hey, we like to be ambitious.
DMs should have access to some sort of ASCII interface that can represent the field and the monsters' and players' locations on it. Likely would have to be coordinate-based.

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.