Skip to content

SteveOrDan/DnD-Discord-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Class diagram of the project

---
title: DnD campaign
---
classDiagram
namespace DnDCampaign {
    class Campaign {
        + player_confirm_delete: []

        + CAMPAIGN_GUILD_ID: int

        + players_num: int
        + ready_players_num: int 
        + PLAYER_NUM_MSG_ID: int

        + campaign_member_list: []

        + has_dm_already: bool

        + players_selected_race: []
        + players_selected_class: []


        + check_if_can_start_campaign(self) -> bool
        + add_ready_player(self)
        + remove_ready_player(self)
        + get_member(self, member_name: str) -> CampaignMember | None
    }

    class CampaignState {
        <<enumeration>>
        NONE = -1
        CREATED = 0
        BUILDING_CHARACTER = 1
    }

    class Encounter {
        monsters: dict
        initiative_order: list
        curr_index: int

        + get_by_id(self, monster_id: str) -> MonstersDataBase.Monster | None
        + get_first_in_order(self) -> str
        + get_next_in_order(self) -> str
        + damage(self, monster_id: str, damage: int)
        + check_if_encounter_over(self) -> bool
        + toString(self) -> str
        + initiative_order_to_string(self) -> str
        + remove(self, monster_id: str)
    }
}

class StatTypeEnum {
    <<enumeration>>
    NONE = -1, "NONE"
    STR = 0, "STR"
    DEX = 1, "DEX"
    CON = 2, "CON"
    INT = 3, "INT"
    WIS = 4, "WIS"
    CHA = 5, "CHA"
}

namespace Items {
    class ItemsDatabase{
        items: dict

        + get_item(item_name: str) -> Weapon | Armor | None
    }

    class Item {
        + name: str
        + weight: int
    }

    class WeaponProperty {
        <<enumeration>>
        AMMUNITION_30_120 = 0
        AMMUNITION_80_320 = 1
        AMMUNITION_150_600 = 2
        FINESSE = 3
        HEAVY = 4
        LIGHT = 5
        LOADING = 6
        REACH = 7
        SPECIAL = 8
        THROWN_20_60 = 9
        TWO_HANDED = 10
        VERSATILE = 11
    }

    class WeaponType {
        <<enumeration>>
        SIMPLE_MELEE = 0
        SIMPLE_RANGED = 1
        MARTIAL_MELEE = 2
        MARTIAL_RANGED = 3
    }

    class ArmorType {
        <<enumeration>>
        LIGHT = 0
        MEDIUM = 1
        HEAVY = 2
        SHIELD = 3
    }

    class ArmorStr {
        <<enumeration>>
        NONE = -1
        STR13 = 0
        STR15 = 1
    }

    class DamageType {
        <<enumeration>>
        BLUDGEONING = 0
        PIERCING = 1
        SLASHING = 2
    }

    class Weapon
    class Armor

    class Cost {
        + value: int
    }

    class CoinType {
        <<enumeration>>
        PP = 0
        GP = 1
        SP = 2
        CP = 3
    }
}

namespace User {
    class CampaignMember {
        member: discord.Member | None

        inventory: dict
        equipped_weapon: Weapon | None
        equipped_armor: Armor | None
        has_shield: bool

        isAdventurer: bool
        isDM: bool 

        player_num: int

        alignment: str
        background: str
        traits: str
        ideals: str
        bonds: str
        flaws: str

        + confirm_race(self)
        + confirm_class(self)
        + update_total_stat(self, stat_index: int)
        + update_all_total_stat(self)
        + update_stat_ch(self, stat_index: int)
        + update_all_stat_ch(self)
        + update_stats_modifiers(self)
        + update_armor_class(self)
        + update_max_hit_points(self)
        + heal(self, heal_amount: int)
        + get_info(self) -> str
        + add_xp(self, xp: int)
        + level_up(self)
        + update_max_inventory_weight(self)
        + update_curr_inventory_weight(self)
        + get_inventory_str(self) -> str
        + get_equipment_str(self) -> str
        + get_known_spells_str(self) -> str
        + get_prepared_spells_str(self) -> str
        + update_total_speed(self)
        + remove_item_from_inv(self, item_name: str, amount: int)
        + add_item_to_inv(self, item_name: str, amount: int)
    }

    class UserStats {
        STR_ch: discord.VoiceChannel | None
        DEX_ch: discord.VoiceChannel | None
        CON_ch: discord.VoiceChannel | None
        INT_ch: discord.VoiceChannel | None
        WIS_ch: discord.VoiceChannel | None
        CHA_ch: discord.VoiceChannel | None

        level: int
        xp: int

        total_speed: int
        race_speed: int
        speed_debuff: int

        armor_class: int

        maxHitPoints: int
        currHitPoints: int

        stats_modifiers: [int]
        total_stats: [int]
        rolled_stats: [int]
        race_stats: [int]
        equip_stats: [int]

        stats_set_num: int
        stats_set_bools [bool]

        roll_list: [int]

        max_inventory_weight: int
        curr_inventory_weight: int
    }

    class SpellsInfo {
        max_cantrips_known: int
        max_spell_slots: int
        curr_spell_slots: int
        max_preparable_spells: int
        prepared_spells: [str]
        spells_known_list: [str]
    }

    class Proficiencies {
        weapon_proficiencies: [WeaponType]
        armor_proficiencies: [ArmorType]
        saving_throw_proficiencies: [str]
        race_proficiencies: [str]
        class_proficiencies: [str]

        proficiency_bonus: int
    }

    class Purse {
        purse: [int]

        + add(self, amount: int, coinType: int)
        + remove(self, amount: int, coinType: int) -> bool
        + get(self, coinType: CoinType) -> int
        + getPurse(self) -> [int]
        + toString(self) -> str
    }

    class AdvClass {
        <<enumeration>>
        CLERIC
        FIGHTER
        ROGUE
        WIZARD
    }

    class RaceTypeEnum {
        <<enumeration>>
        DWARF
        HILL_DWARF
        MOUNTAIN_DWARF
        ELF
        HIGH_ELF
        WOOD_ELF
        HALFLING
        STOUT
        LIGHTFOOT
        HUMAN
    }
}

CampaignMember *-- Proficiencies: proficiencies
CampaignMember *-- UserStats: stats
CampaignMember *-- SpellsInfo: spells_info
CampaignMember *-- RaceTypeEnum: race
CampaignMember *-- AdvClass: adv_class
CampaignMember *-- Purse: purse

class constants {
    + IDs
}

namespace Dices {
    class Dice{
        + faces: int

        + throw(self) -> int
        + throw_n(self, n) -> int
    }

    class D4 {
        faces: int = 4
    }
    class D6 {
        faces: int = 6
    }
    class D8 {
        faces: int = 8
    }
    class D10 {
        faces: int = 10
    }
    class D12 {
        faces: int = 12
    }
    class D20 {
        faces: int = 20
    }
    class D100 {
        faces: int = 100
    }
}

Dice <|-- D4
Dice <|-- D6
Dice <|-- D8
Dice <|-- D10
Dice <|-- D12
Dice <|-- D20
Dice <|-- D100

namespace MonsterDatabase {
    class MonstersDataBase {
        monsters: dict

        + get_monster(monster_name: str) -> Monster | None
        + monster_info(monster_name: str) -> str
        + get_all_monsters()
    }

    class Monster {
        name: str
        AC: int
        HP: int

        total_stats: [int]
        stats_modifiers: [int]

        attack_bonus: int
        dice_num: int
        damage_dice: Dice
        damage_bonus: int

        + calculate_modifiers(self)
        + take_damage(self, damage: int) -> int
        + attack(self, player_AC: int) -> int
        + ability_check(self, ability: str)
        + toString(self)
    }
}

MonstersDataBase *-- Monster

namespace Spells {
    class Spell {
        name: str
        level: int
        cast_time: str
        cast_range: str
        components: str
        duration: str
        description: str

        + cast(caster: CampaignMember, params: str)
    }
    class Light
    class Resistance
    class MageHand
    class SpareTheDying
    class DetectMagic
    class HealingWord
    class Prestidigitation
    class MagicMissile
}
Spell <|-- Light
Spell <|-- Resistance
Spell <|-- MageHand
Spell <|-- SpareTheDying
Spell <|-- DetectMagic
Spell <|-- HealingWord
Spell <|-- Prestidigitation
Spell <|-- MagicMissile

ItemsDatabase *-- Item

Item <|-- Armor
Item <|-- Weapon

Armor *-- ArmorType : armorType
Armor *-- ArmorStr : str_value

Weapon *-- WeaponProperty : properties
Weapon *-- WeaponType : weaponType
Weapon *-- DamageType : damage_type

Item *-- Cost : cost

Cost *-- CoinType : coinType

Campaign *-- Encounter : curr_encounter
Campaign *-- CampaignState : campaign_state
Loading

Setting up the DnD Discord Server

At the bottom you can find the command list

This guide is made up of 3 sections:

A. Server creation, where it explains how to create the ad hoc server for the Discord bot

B. Bot code download, where it explains how to correctly download the bot code

C. Bot setup, where it explains how to correctly connect the bot to the Discord server

  1. Open Discord: Launch the Discord application on your device.

  2. Enter the link in an internet browser: Copy the provided template link and paste it into the address bar of any internet browser. Template link: https://discord.new/gwBAdaPzqNcW

  1. Click on “Continue to Discord”: After entering the link, you will see an option called “Continue to Discord”. Click on it.

  1. Return to Discord: Go back to the Discord application. A window should have appeared to create a server based on the provided template.

  1. Enter the desired name: Enter the name you want for your server in the provided text field.

  1. Click on “Create Server”: After entering the name, click on the “Create Server” button. Now, you have created your Discord server using the provided template!
  1. Open the Repository: Open your internet browser and navigate to the GitHub repository using the provided link. Repository GitHub: https://github.com/SteveOrDan/DnD-Discord-Bot

  1. Access the Code: Once you’re on the repository page, look for a green button labeled “Code” at the top right of the page. Click on this button to open a dropdown menu.

  1. Download the ZIP: In the dropdown menu, you’ll see an option labeled “Download ZIP”. Click on this option to start the download process. The code from the repository will be downloaded as a ZIP file to your computer.

  2. Extract the Files: After the ZIP file has finished downloading, locate it in your downloads folder or wherever your browser saves downloaded files. Right-click on the ZIP file and select “Extract All” (or a similar option, depending on your operating system). Follow the prompts to extract the files from the ZIP. Once the extraction process is complete, you’ll have a folder containing all the files from the GitHub repository.

  1. Go to the Discord Developer Portal: Open your web browser and navigate to the Discord Developer Portal.
  2. Discord developer portal: https://discord.com/developers/applications and create a new application by clicking on the “New Application” button. Give your application a name and then click “Create”.

  1. Go to the OAuth2 Page: In your application’s settings, navigate to the “OAuth2” tab.

  1. Select Bot under OAuth2 URL Generator: Under the “OAuth2 URL Generator”, select the “bot” checkbox.

  1. Select Administrator in Bot Permissions: Scroll down to the “Bot Permissions” section and select the “Administrator” checkbox.

  1. Copy the Generated Link: At the bottom of the page, you’ll see a generated URL. Click on “Copy” to copy this URL.

  1. Paste the Link in a New Browser Tab: Open a new tab in your web browser and paste the copied URL into the address bar.

  1. Select Your Server: A new page will open asking you to select a server. Choose the server where you want to add your bot, then click on the “Authorise” button.

  1. Navigate to the Bot Tab: In your application’s settings, find and click on the “Bot” tab. This will take you to the page where your bot’s settings are located.

  1. Press Reset Token: On the Bot settings page, find the “Token” section and click on “Reset Token”.

  1. Confirm Reset: A pop-up message will appear asking you to confirm the reset. Click on “Yes, do it!” to confirm.

  1. Enter Password: You will be asked to enter your password to confirm the reset. Enter your password and proceed.

  1. Copy the New Token: After resetting, a new token will be generated. Click on “Copy” to copy your bot’s new token. This token is what your bot uses to log in to Discord, so keep it safe!

14. Locate the Extracted Code Folder: Navigate to the location on your computer where you previously extracted the bot code. This could be in your “Downloads” folder, “Documents” folder, or wherever you chose to extract the files.

  1. Open the Folder: Double-click on the folder to open it. You should now see all the files that were contained in the ZIP file.

  2. Open the “constants.py” File: In the folder, find the file named “constants.py”. Right-click on the file and select “Open with”. Choose your preferred code editor from the list. If you don’t see your code editor, click on “Choose another app” and locate it.

  3. Navigate to the BOT_TOKEN Line: Scroll down to the bottom of the “constants.py” file until you find a line that says BOT_TOKEN. This line should look something like this:  BOT_TOKEN = "MTIxMDIxMzc1NTYxMTM5…".

  4. Replace the Bot Token: Replace the text between the quotation marks with the bot token you copied in step 13. The line should now look like this: BOT_TOKEN = " your_new_bot_token ".

  5. Save Your Changes: After replacing the bot token, save your changes. You can usually do this by pressing Ctrl+S or selecting “Save” from the file menu.

  6. Update IDs in the “constants.py” File: For each entry in the “constants.py” file, you need to find the corresponding element in your Discord server and copy its ID. To do this, right-click on the element (this could be a user, channel, role, etc.) and select “Copy ID”. Then, go back to the “constants.py” file and replace the existing ID with the one you just copied. Make sure to place the new ID in the correct spot in the file. Here is how to do it:

    1. Enable Developer Mode: First, you need to enable Developer Mode in Discord. To do this, click on the gear icon near your username at the bottom left to open User Settings. Then, navigate to the “Appearance” tab under “App Settings”. Scroll down to the “Advanced” section and toggle on “Developer Mode”.
    2. Copy Channel ID: To copy a channel ID, go to the channel from which you want to copy the ID. Right-click on the channel name at the top of the screen and select “Copy ID”. The channel ID is now copied to your clipboard.
    3. Copy Role ID: To copy a role ID, you need to go to the server settings. Click on the server name at the top left of the screen and select “Server Settings”. Then, navigate to the “Roles” tab. Here, you’ll see a list of all roles in your server. To copy a role ID, right-click on the role and select “Copy ID”. The role ID is now copied to your clipboard.

IDs legend:

General IDs

  • GENERAL_CHAT_ID: The ID of the general chat channel in your Discord server.
  • GUILD_ID: The ID of your Discord server (also known as a guild in Discord’s API).
  • DEFAULT_ROLES: The default roles that are assigned to new members when they join your server.
  • DEFAULT_CH: The default channel that new members are directed to when they join your server.
  • CAMPAIGN_CHANNELS: The list of channels in your server that are used for campaign discussions.

Channel IDs

  • CAMPAIGN_CHAT_ID: The ID of the channel used for campaign chat.
  • GET_FEATURES_CHAT_ID: The ID of the channel where users can get features for their characters.
  • SET_ROLES_CHAT_ID: The ID of the channel where users can set their roles.
  • DM_CHAT_ID: The ID of the channel for direct messages.
  • RACE_INFO_CHAT_ID: The ID of the channel where information about races is posted.
  • CLASS_INFO_CHAT_ID: The ID of the channel where information about classes is posted.
  • SET_RACE_CHAT_ID: The ID of the channel where users can set their character’s race.
  • SET_CLASS_CHAT_ID: The ID of the channel where users can set their character’s class.

Player based channels

  • PLAYERS_ROLL_STATS_CH_ID: The ID of the channel where players roll for their character’s stats.
  • PLAYERS_STR_STAT_CH_ID: The ID of the channel where players set their character’s Strength stat.
  • PLAYERS_DEX_STAT_CH_ID: The ID of the channel where players set their character’s Dexterity stat.
  • PLAYERS_CON_STAT_CH_ID: The ID of the channel where players set their character’s Constitution stat.
  • PLAYERS_INT_STAT_CH_ID: The ID of the channel where players set their character’s Intelligence stat.
  • PLAYERS_WIS_STAT_CH_ID: The ID of the channel where players set their character’s Wisdom stat.
  • PLAYERS_CHA_STAT_CH_ID: The ID of the channel where players set their character’s Charisma stat.

Role IDs

  • DM_ROLE_ID: The ID of the Dungeon Master role.
  • ADVENTURER_ROLE_ID: The ID of the Adventurer role.
  • CAMPAIGN_ROLE_ID: The ID of the Campaign role.
  • HUMAN_ROLE_ID: The ID of the Human race role.
  • STOUT_ROLE_ID: The ID of the Stout subrace role.
  • LIGHTFOOT_ROLE_ID: The ID of the Lightfoot subrace role.
  • HALFLING_ROLE_ID: The ID of the Halfling race role.
  • WOOD_ELF_ROLE_ID: The ID of the Wood Elf subrace role.
  • HIGH_ELF_ROLE_ID: The ID of the High Elf subrace role.
  • ELF_ROLE_ID: The ID of the Elf race role.
  • MOUNTAIN_DWARF_ROLE_ID: The ID of the Mountain Dwarf subrace role.
  • HILL_DWARF_ROLE_ID: The ID of the Hill Dwarf subrace role.
  • DWARF_ROLE_ID: The ID of the Dwarf race role.
  • WIZARD_ROLE_ID: The ID of the Wizard class role.
  • ROGUE_ROLE_ID: The ID of the Rogue class role.
  • FIGHTER_ROLE_ID: The ID of the Fighter class role.
  • CLERIC_ROLE_ID: The ID of the Cleric class role.
  • BUILDING_CHARACTER_ROLE_ID: The ID of the role for users who are currently building their character.
  • CHOOSING_ROLE_ROLE_ID: The ID of the role for users who are currently choosing their role.

Player Role IDs

  • P1_ROLE_ID: The ID of the role for Player 1.
  • P2_ROLE_ID: The ID of the role for Player 2.
  • P3_ROLE_ID: The ID of the role for Player 3.
  • P4_ROLE_ID: The ID of the role for Player 4.
  • P5_ROLE_ID: The ID of the role for Player 5.

Alignment Role IDs

  • LAWFUL_GOOD_ROLE_ID: The ID of the Lawful Good alignment role.
  • NEUTRAL_GOOD_ROLE_ID: The ID of the Neutral Good alignment role.
  • CHAOTIC_GOOD_ROLE_ID: The ID of the Chaotic Good alignment role.
  • LAWFUL_NEUTRAL_ROLE_ID: The ID of the Lawful Neutral alignment role.
  • NEUTRAL_ROLE_ID: The ID of the Neutral alignment role.
  • CHAOTIC_NEUTRAL_ROLE_ID: The ID of the Chaotic Neutral alignment role.
  • LAWFUL_EVIL_ROLE_ID: The ID of the Lawful Evil alignment role.
  • NEUTRAL_EVIL_ROLE_ID: The ID of the Neutral Evil alignment role.
  • CHAOTIC_EVIL_ROLE_ID: The ID of the Chaotic Evil alignment role.

Note

Here start the command list.

Commands list

Campaign management

  • !cc <user1> <user2> :
    • Channel: #general
    • Context: To start a campaign in the server.
    • Description: Needs at least 3 users but less than 7 users to start a campaign. All users are given the “Choosing role” role, that allows them to select a role in the current campaign (DM or Adventurer). Only 1 DM may exist per campaign.
  • !dc :
    • Context: To delete a campaign.
    • Description: This command starts a vote to delete the current campaign. The campaign will be deleted only after every member has typed !dc to confirm the campaign deletion.
  • !sc :
    • Context: To start a campaign only when all players has set a role.
    • Description: It’s a command that can be used only after creating a campaign, when all users specified in the !cc command have chosen a role. With this command, the DM is given access to his personal chat #dm-chat. The adventurers instead are given access to a list of channels that allows them to create their character for the campaign.

Building a character

  • !info :
    • Description: Sends a link to download the Basic rules book.
  • !default_stats :
    • Channel: #roll-stats
    • Description: It’s a command that can be used only by Adventurers to avoid randomly rolling for their stats and gives them a preset of stats to assign to their character.
  • !roll_stats :
    • Channel: #roll-stats
    • Description: It’s a command that can be used only by Adventurers in the #roll-stats channel to randomly roll for the 6 stats of a character.
  • !set <stat_name> :
    • Channel: #roll-stats
    • Description: After rolling for the stats, the Adventurer will be asked to assign each number to a stat. This can be done with the !set command.
  • !swap <stat_1> <stat_2> :
    • Description: If the adventurer made some mistake while assigning the stats, he can use !swap to swap the values of the two specified stats.
  • !set_alignment <alignment> :
    • Channel: #character-features
    • Description: Sets the alignment for the user’s character.
  • !complete_char :
    • Context: After completing the character creation.
    • Description: The command checks if the player has set a class, a race, an alignment and all 6 stats. If everything is set, the bot sends a message with all the information of the character created.
  • !quick_char_create <class> <race> <STR_value> <DEX_value> <CON_value> <INT_value> <WIS_value> <CHA_value> <alignment_if_not_N> :
    • Context: After using !sc, only for an adventurer.
    • Description: Allows an adventurer to quickly create a character if they already know how to create one. Every player is given 27 points, and they can “spend” those points in stats. Each stat value has a corresponding value in points used, and the player cannot exceed that limit, otherwise the character creation will be aborted.

Optional character features

  • !set_name <character_name>:
    • Channel: #character-features
    • Context: While creating a character (Optional)
    • Description: Changes the nickname of the user in the server to the specified nickname.
  • !random_name <race> <gender> <clan_if_human>:
    • Description: Generates a random name based on the given parameters. The name is sent by the bot in the same chat where the messages is written.
  • !set_bg <background>:
    • Channel: #character-features
    • Context: While creating a character (Optional)
    • Description: Sets the background for the user’s character.
  • !set_traits <traits >:
    • Channel: #character-features
    • Context: While creating a character (Optional)
    • Description: Sets the traits for the user’s character.
  • !set_ideals <ideals>:
    • Channel: #character-features
    • Context: While creating a character (Optional)
    • Description: Sets the ideals for the user’s character.
  • !set_bonds <bonds >:
    • Channel: #character-features
    • Context: While creating a character (Optional)
    • Description: Sets the bonds for the user’s character.
  • !set_flaws <flaws >:
    • Channel: #character-features
    • Context: While creating a character (Optional)
    • Description: Sets the flaws for the user’s character.

Transactions and items

  • !request_buy <item_name> <amount = 1>:
    • Channel: None (Usually#campaign-chat)
    • Context: After completing a character.
    • Description: An adventurer can send the DM a request to buy an item from the data base. By default, the amount is set to 1, but the adventurer can specify a different number. The DM will receive a notification in #dm-chat with all the information of the transaction. The transaction can only be started if the adventurer has enough space in the inventory.
  • !set_buy_price <user> <item> <price> <currency>:
    • Channel: None (Usually in #dm-chat)
    • Context: When receiving a request to buy an item from an adventurer.
    • Description: The DM must specify the user and the item of the transaction which he want to set a price for. The price can be expressed with a number followed by the type of currency (CP, GP …), this way the DM will change the default price of the transaction. If he thinks that the default price is good enough, he can type “default” instead of the price. After setting the price the adventurer will receive a notification with the price set by the DM.
  • !accept_buy <item> :
    • Channel: None (Usually #campaign-chat)
    • Context: After the DM has set a price for a transaction previously requested.
    • Description: The adventurer accepts the offer of the DM, buys the item(s) by adding them to the inventory and closes the transaction.
  • !refuse_buy <item> :
    • Channel: None (Usually #campaign-chat)
    • Context: After the DM has set a price for a transaction previously requested.
    • Description: The adventurer refuses the offer of the DM and deletes the transaction.
  • An adventurer can also buy items from his inventory.
    • The logic and the commands are quite the same as the one for buying, with the only difference that the commands need “sell” instead of “buy”.
  • !get_all_transactions :
    • Context: Only for the DM to check which transactions are still ongoing.
    • Description: The bot sends a message with all the ongoing transactions.
  • !get_purse <member> :
    • Channel: None (Usually #campaign-chat)
    • Context: After creating the character.
    • Description: The bot sends a message showing all the coins of a character divided by currency type.
  • !equip <item> :
    • Context: During adventure.
    • Description: A character can decide to equip an item (armor or weapon) and if the item is in the inventory the current equipped item will be swapped with the new one. The old one will be put in the inventory. Equipping an armor too heavy for the character, will cause him to lose some speed.
  • !unequip <item_type> :
    • Context: During adventure.
    • Description: A character can decide to unequip an item (“armor” or “weapon”) and if the item is equipped, it is moved back to the inventory.

Dice rolls

  • !ability_check <ability> :
    • Context: Whenever the DM request an ability check.
    • Description: The user rolls a D20 and adds the modifier of the checked stat. 1 is a critical failure, while 20 is a critical hit.
  • !roll_dice <dice> :
    • Description: Just rolls the dice specified in the command (1d6, 1d20 …)
  • !saving_throw <ability> :
    • Context: Whenever requested by the DM.
    • Description: The user throws a D20 and adds the stat modifier and the proficiency bonus (if available)

Combat

  • !create_monster <name> <AC> <HP> <STR> <DEX> <CON> <INT> <WIS> <CHA> <attack_bonus> <dice_num> <damage_dice> <damage_bonus>:
    • Description: Only for the DM. Allows him to create a new monster and add it to the monster data base. After creating the monster, it can be used in an encounter for the adventurers.
  • !set_encounter <monster_name_1>:<count>, <monster_name_2>:<count>, ... :
    • Description: Creates an encounter for the adventurers to clear.
  • !attack_monster <ability> <monster_id> :
    • Context: After the DM has created an encounter.
    • Description: The adventurer can decide with which stat he wants to attack a certain monster. Monster IDs are sent by the bot after the encounter has been set by the DM.
  • !attack_player <member> <monster> :
    • Context: During a fight.
    • Description: Only for the DM. Allows a monster to attack an adventurer and eventually deal damage to him.

Spells

  • !prepare <spell_name> :
    • Description: Allows a cleric or a wizard to prepare a spell that can be casted. The adventurer needs to know the spell he is preparing.
  • !unprepare <spell_name> :
    • Description: Allows a wizard or a cleric to remove a spell from the list of prepared spells.
  • !cast <spell_name> <parameters> :
    • Description: This command is a bit particular, since its parameters may change depending on the spell that the adventurer wants to cast.
    • Light: <object>
      • Cast light on the specified object.
    • Resistance: <user>
      • Cast resistance on a user and they can add a d4 to a saving roll of their choice.
    • Mage hand
    • Spare the dying: <target>
      • Cast spare the dying on the specified target.
    • Detect magic
    • Healing word: <user>
      • Heals the specified user by d4 + WIS mod.
    • Prestidigitation: <effect>
      • Cast prestidigitation with the effect specified by the effect parameter.
    • Magic missile: <target1>, <target2>, <target3>
      • Cast magic missile 3 targets and damages them. To use this spell the casted needs to be involved in an encounter, and the target must be monsters from that same encounter.
  • !rest :
    • Description: The adventurer can rest and restore all available slots to cast magic spells.

Miscellaneous

  • !get_prepared_spells :
    • Description: The bot sends a message with all the user’s prepared spells.
  • !get_known_spells :
    • Description: The bot sends a message with all the user’s known spells.
  • !get_inventory :
    • The bot sends a message with al the items in the user’s inventory.
  • !get_equipment :
    • The bot sends a message with the user’s current equipped weapon and armor.
  • !get_member_info <member> :
    • Description: The bot sends a message with all the information available of the specified user.
  • !get_all_monsters :
    • Description: The bot sends a message containing all the monsters stored in the database and their information.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages