dnglokpor / IsekaiBot

Python body of a Discord bot setting up RPG like fantasy game. The implementation uses the asynchronous python library Discord.py with custom RPG elements to set up a text based game run by an autonomous bot deployed from a computer. The bot allows registering, exploring dungeon floors, fighting monsters and save/load operations on named-users accounts.
6 stars 1 forks source link

Help #2

Open clarinetandmonkey opened 3 years ago

clarinetandmonkey commented 3 years ago

Ok so first of all, can I have the link for the tutorial. Okay second I have an error

notskiddingoranythingjustcopyingabitofyourcode

but here is the error

Command raised an exception: TypeError: narrate() missing 1 required positional argument: 'description'

this happens when i try to literally do any commands, the commands like explore just say you have to be registered first, which I already am. And when i run any commands it says sorrytherewasanissueillletthedevsknowaboutthattryagainlater

and btw i'm not stealing and code orskiddingorsomethingofthesort just using a tiny little bit

dnglokpor commented 3 years ago

Not sure what you mean by a "link" for the tutorial. Can you provide more details?

If I understand correctly you cloned the repository and set in up to run it on a discord server? If so make sure the folder structure is correct. Check the methods that do save and load for more information on where saving and loading are done on the disk.

Also please add a stack trace of the error. This is code I put together over break as a personal experiment. Most things are ideas of which I started implementation but school started back and I didn't have enough time to properly complete and debug.

dnglokpor commented 3 years ago

You made me realize that I forgot to add the files for the first floor to the code. I have now uploaded it. You should download it with the folder. The exploration code was probably expecting it. Unless you provided your own, it wouldn't have worked. Also I added a video (https://github.com/dnglokpor/IsekaiBot/blob/master/TestRun.mp4) that shows a run as of Today. I tested out most commands and they are working; minus a couple bugs.

clarinetandmonkey commented 3 years ago

nonon, This is what i did i used a part of your code don't be mad and added it to my bot

ok not a part maybe likeee the whole code ;-;

but i did credit you

pls don be mad

dnglokpor commented 3 years ago

It's fine. As I said in the readme, this code is just me throwing stuff together. If it's useful to someone that makes me happy lol. Anyway do you have the error stack trace? I need it to determine what error you're facing. But do add the dungeon to your code first. It's a premade that you can actually explore.

clarinetandmonkey commented 3 years ago

Ok so, quick question. Is there anyway to edit the narrate so it doesn't send 5 messages. I really want it to be 1 message in an embed. If you can tell me how to do that that would be really great!

and here is the error

error:


    ret = await coro(*args, **kwargs)
  File "main.py", line 4475, in kstart
    if await register(context, TRAVELER): # was registered
  File "main.py", line 4444, in register
    await narrate("Hey there! You are already an traveler!")
TypeError: narrate() missing 1 required positional argument: 'description'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 892, in invoke
    await ctx.command.invoke(ctx)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 797, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 92, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: narrate() missing 1 required positional argument: 'description'```
dnglokpor commented 3 years ago

Ok so, quick question. Is there anyway to edit the narrate so it doesn't send 5 messages. I really want it to be 1 message in an embed. If you can tell me how to do that that would be really great!

and here is the error

error:

    ret = await coro(*args, **kwargs)
  File "main.py", line 4475, in kstart
    if await register(context, TRAVELER): # was registered
  File "main.py", line 4444, in register
    await narrate("Hey there! You are already an traveler!")
TypeError: narrate() missing 1 required positional argument: 'description'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 892, in invoke
    await ctx.command.invoke(ctx)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 797, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 92, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: narrate() missing 1 required positional argument: 'description'```

Sorry for the late response.

I'd recommend you look at the definition of narrate more in depth (IsekaiBot.py li. 527). It has two different definitions in one (python allows that kind of things). For it to send stuff in multiple messages you pass a list of strings. But if you pass a single string (not a list with one string but just one string) it sends it all in a single message.

Also the message has to be a the 2nd argument. There is a first argument that is the channel to send the message to. I mean remember that my code was made to work on Discord. Narrate needs to be able to speak to the platform.

clarinetandmonkey commented 3 years ago

Ok, I know this isn't an issue but can I use this issue thingy to tell you my ideas?

I expanded the dungeon thingy and made a floor 2 is it good?

Floor 2 is a bit at the bottom


{
    "floor": {
        "name": "Floor 1",
        "stratum": "Verdant Green Stratum",
        "size": 15,
        "danger": 1,
        "monsters": [
            {
                "name": "Green Slime",
                "class": "monster",
                "level": 1,
                "stats": [15, 10, 7, 8, 6, 7, 1, 1],
                "loot": [
                    {
                        "name": "Green Core Fragments",
                        "type": "n_consumable",
                        "description": "Fragments of a Green Slime core. Can be sold for a cheap price.",
                        "stats": null,
                        "reqs": null
                    }
                ]
            },
            {
                "name": "Punny Bunny",
                "class": "monster",
                "level": 1,
                "stats": [18, 13, 7, 9, 6, 11, 1, 1],
                "loot": [
                    {
                        "name": "Rabbit Pelt",
                        "type": "n_consumable",
                        "description": "\"Neige\" coloured pelt of a freshly skinned Punny Bunny. Fetches a cheap price at the local smith.",
                        "stats": null,
                        "reqs": null
                    } 
                ]
            }
    ],
    "class2monsters": [
      {
                "name": "Sparkcore Dragon",
                "class": "class2monsters",
                "level": 5,
                "stats": [30, 27, 14, 37, 23, 18, 1, 1],
                "loot": [
                    {
                        "name": "Dragon Soul",
                        "type": "n_consumable",
                        "description": "Nobody knows where the Sparkcore Dragons come from. But the souls that drop from them are used for crafing gear at most places. They are very rare to find these days because they cost so much money.",
                        "stats": null,
                        "reqs": null
                    }
                ]
            },
      {
                "name": "Brightcore Dragon",
                "class": "class2monsters",
                "level": 5,
                "stats": [40, 27, 14, 37, 23, 8, 1, 1],
                "loot": [
                    {
                        "name": "Brightcore Dragon Soul",
                        "type": "n_consumable",
                        "description": "Brightcore Dragons are usually friendly and guard most citys or villages. Brightcore Dragons are one of the slowest monsters, but trust me when I say they pack a PUNCH. Brightcore Dragon souls can fetches a decent price at the local smith.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     },
     {
                "name": "Shadowcore Dragon",
                "class": "class2monsters",
                "level": 6,
                "stats": [73, 37, 24, 47, 43, 32, 1, 1],
                "loot": [
                    {
                        "name": "Shadow Soul",
                        "type": "n_consumable",
                        "description": "Shadowcore Dragons are very rare monsters. They are known for their outstanding amount of damage and speed. But they are very dangerous, one incident known as the 'Morioh Case'||yes its copied from jojo|| Shows how dangerous these fellas are.   You can use `.cases` to check it out. Shadow Souls can be used to craft shadow weapons. They can fetch an extremly good price due to how rare it is.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     },
     {
                "name": "Moonbeam Demon",
                "class": "class2monsters",
                "level": 18,
                "stats": [132, 231, 121, 79, 89, 92, 1, 1],
                "loot": [
                    {
                        "name": "Moonshard",
                        "type": "n_consumable",
                        "description": "Dropped from a Moonbeam Demon. Moonbeam Demons are one of the strongest of the demon class, but they are very rare. One Moonbeam Demon caused one of the most famous incidents. check `.cases` to check it out. This can be drolled on by your local smith for a breathtaking price.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     }
    ],
        "monsters prob.": [60, 40],
    "class2monstersprob": [30, 20, 2, 0.01],
        "encounter rate": 60,
        "swarm size": 5,
        "boss": null,
        "specials": [
            {
                "block": 9,
                "event": "gathering",
                "type": "herbs",
                "items": [
                    {
                        "name": "Bittherb",
                        "type": "n_consumable",
                        "description": "They say it is most bitter herb in the world. Good for making remedies.",
                        "stats": null,
                        "reqs": null
                    },
                    {
                        "name": "Moonflower",
                        "type": "n_consumable",
                        "description": "A flower that grows towards the moon. Often found in forests under tall trees.",
                        "stats": null,
                        "reqs": null
                    },
                    {
                        "name": "Blade Grass",
                        "type": "n_consumable",
                        "description": "Beware cuts. Smiths believe that using it in their fire make their weapons sharper.",
                        "stats": null,
                        "reqs": null
                    }
                ],
                "rates": [60, 15, 25]
            }
        ],
        "narration": {
            "intros": [
                "As {} walked through the vast greenery, they spotted a wide open clearing.",
                "As {} explored the green forest, they saw a cluster of tall bushes.",
                "Walking through a patch of tall grass, {} came across a group of tall trees."
            ],
            "continues": [
                "{} decided to move on.",
                "There was nothing more to do there so {} kept on going.",
                "{} caught their breath for a minute, then decided to continue their exploration."
            ],
            "empty": [
                "A carpet of pretty flowers laid there in their sight and their scent filled the air.",
                "The ground was covered in a thick layer of green grass, sparse with moss covered rocks or branches.",
                "The foliage of the trees blocked most of the sunlight but not as much of the heat.",
                "{} stopped to listen to the noises of nature: birdsongs by the dungeon unique birds.",
                "A bunch of rocks of different sizes could be seen here and there, and covered in green moss.",
                "A small stream could be seen meandering at the base of what seemed to be a small hill.",
                "There was a huge log in the middle of the clearing, covered in strange mushrooms.",
                "A small breeze rose and blew a bunch of dead leaves all around you but quickly faded away."
            ],
            "fight": [
                "Suddenly, they felt a hostile presence and sure enough {} encountered monsters.",
                "Out of nowhere a group of monsters jumped upon the unsuspecting {}.",
                "{} just had the chance to take their weapons that they were face to face with monsters."
            ],
            "stairs": [
                "They see a weird light pillar a little bit forward and steadily walk toward it.",
                "Upon realizing it is the teleporter that leads back to the city, they happily run to it."
            ],
            "boss room": null,
            "herb point": [
                "{} saw that the whole place was covered in various and diverse herbs.",
                "Certainly gathering herbs here could lead to some results."
            ],
            "wood point": null,
            "mineral point": null,
            "completion": [
                "It is the end of your exploration {}.",
                "You are magically transported back to the city."
            ]
        }
    },

    "floor2": {
        "name": "Floor 2",
        "stratum": "Verdant Dark Stratum",
        "size": 32,
        "danger": 30,
    "class2monsters": [
      {
                "name": "Sparkcore Dragon",
                "class": "class2monsters",
                "level": 5,
                "stats": [30, 27, 14, 37, 23, 18, 1, 1],
                "loot": [
                    {
                        "name": "Dragon Soul",
                        "type": "n_consumable",
                        "description": "Nobody knows where the Sparkcore Dragons come from. But the souls that drop from them are used for crafing gear at most places. They are very rare to find these days because they cost so much money.",
                        "stats": null,
                        "reqs": null
                    }
                ]
            },
      {
                "name": "Brightcore Dragon",
                "class": "class2monsters",
                "level": 5,
                "stats": [40, 27, 14, 37, 23, 8, 1, 1],
                "loot": [
                    {
                        "name": "Brightcore Dragon Soul",
                        "type": "n_consumable",
                        "description": "Brightcore Dragons are usually friendly and guard most citys or villages. Brightcore Dragons are one of the slowest monsters, but trust me when I say they pack a PUNCH. Brightcore Dragon souls can fetches a decent price at the local smith.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     },
     {
                "name": "Shadowcore Dragon",
                "class": "class2monsters",
                "level": 6,
                "stats": [73, 37, 24, 47, 43, 32, 1, 1],
                "loot": [
                    {
                        "name": "Shadow Soul",
                        "type": "n_consumable",
                        "description": "Shadowcore Dragons are very rare monsters. They are known for their outstanding amount of damage and speed. But they are very dangerous, one incident known as the 'Morioh Case'||yes its copied from jojo|| Shows how dangerous these fellas are.   You can use `.cases` to check it out. Shadow Souls can be used to craft shadow weapons. They can fetch an extremely good price due to how rare it is.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     },
     {
                "name": "Moonbeam Demon",
                "class": "class2monsters",
                "level": 18,
                "stats": [132, 231, 121, 79, 89, 92, 1, 1],
                "loot": [
                    {
                        "name": "Moonshard",
                        "type": "n_consumable",
                        "description": "Dropped from a Moonbeam Demon. Moonbeam Demons are one of the strongest of the demon class, but they are very rare. One Moonbeam Demon caused one of the most famous incidents. check `.cases` to check it out. This can be drolled on by your local smith for a breathtaking price.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     }
    ],
    "class2monstersprob": [30, 20, 2, 0.01],
        "encounter rate": 60,
        "swarm size": 5,
        "boss": null,
        "specials": [
            {
                "block": 9,
                "event": "gathering",
                "type": "herbs",
                "items": [
                    {
                        "name": "Bittherb",
                        "type": "n_consumable",
                        "description": "They say it is most bitter herb in the world. Good for making remedies.",
                        "stats": null,
                        "reqs": null
                    },
                    {
                        "name": "Moonflower",
                        "type": "n_consumable",
                        "description": "A flower that grows towards the moon. Often found in forests under tall trees.",
                        "stats": null,
                        "reqs": null
                    },
                    {
                        "name": "Blade Grass",
                        "type": "n_consumable",
                        "description": "Beware cuts. Smiths believe that using it in their fire make their weapons sharper.",
                        "stats": null,
                        "reqs": null
                    }
                ],
                "rates": [60, 15, 25]
            }
        ],
        "narration": {
            "intros": [
                "As {} walked through the vast greenery, they spotted a wide open clearing.",
                "As {} explored the green forest, they saw a cluster of tall bushes.",
                "Walking through a patch of tall grass, {} came across a group of tall trees."
            ],
            "continues": [
                "{} decided to move on.",
                "There was nothing more to do there so {} kept on going.",
                "{} caught their breath for a minute, then decided to continue their exploration."
            ],
            "empty": [
                "A carpet of pretty flowers laid there in their sight and their scent filled the air.",
                "The ground was covered in a thick layer of green grass, sparse with moss covered rocks or branches.",
                "The foliage of the trees blocked most of the sunlight but not as much of the heat.",
                "{} stopped to listen to the noises of nature: birdsongs by the dungeon unique birds.",
                "A bunch of rocks of different sizes could be seen here and there, and covered in green moss.",
                "A small stream could be seen meandering at the base of what seemed to be a small hill.",
                "There was a huge log in the middle of the clearing, covered in strange mushrooms.",
                "A small breeze rose and blew a bunch of dead leaves all around you but quickly faded away."
            ],
            "fight": [
                "Suddenly, they felt a hostile presence and sure enough {} encountered monsters.",
                "Out of nowhere a group of monsters jumped upon the unsuspecting {}.",
                "{} just had the chance to take their weapons that they were face to face with monsters."
            ],
            "stairs": [
                "They see a weird light pillar a little bit forward and steadily walk toward it.",
                "Upon realizing it is the teleporter that leads back to the city, they happily run to it."
            ],
            "boss room": null,
            "herb point": [
                "{} saw that the whole place was covered in various and diverse herbs.",
                "Certainly gathering herbs here could lead to some results."
            ],
            "wood point": null,
            "mineral point": null,
            "completion": [
                "It is the end of your exploration {}.",
                "You are magically transported back to the city."
            ]
        }
     }
  }
}      ```
clarinetandmonkey commented 3 years ago

Ok bro I changed it I now have 5 floors, you can use the code if you want for your own bot. I made up the mob names so if they are cringe tell me. Each floor is in it's own file but I will send them all.

Ok if you want to search for floors use ctrl f and search number two - five use the word form for the numbers not the number form.


# floor two
{
    "floor": {
        "name": "Floor 2",
        "stratum": "Sparky Dark Stratum",
        "size": 32,
        "danger": 20,
    "monsters": [
      {
                "name": "Green Slime",
                "class": "monster",
                "level": 1,
                "stats": [19, 14, 11, 12, 10, 11, 1, 1],
                "loot": [
                    {
                        "name": "Green Core Fragments",
                        "type": "n_consumable",
                        "description": "Fragments of a Green Slime core. Can be sold for a cheap price.",
                        "stats": null,
                        "reqs": null
                    }
                ]
            },
            {
                "name": "Punny Bunny",
                "class": "monster",
                "level": 1,
                "stats": [22, 17, 11, 13, 10, 15, 1, 1],
                "loot": [
                    {
                        "name": "Rabbit Pelt",
                        "type": "n_consumable",
                        "description": "\"Neige\" coloured pelt of a freshly skinned Punny Bunny. Fetches a cheap price at the local smith.",
                        "stats": null,
                        "reqs": null
                    } // HP ATK DEF SPATK SPDEF AGI CRIT LUCK 
          //   40, 12, 10, 12, 10, 8, 1, 1
                ]
            },
      {
                "name": "Sparkcore Dragon",
                "class": "monsters",
                "level": 5,
                "stats": [30, 27, 14, 37, 23, 18, 1, 1],
                "loot": [
                    {
                        "name": "Dragon Soul",
                        "type": "n_consumable",
                        "description": "Nobody knows where the Sparkcore Dragons come from. But the souls that drop from them are used for crafing gear at most places. They are very rare to find these days because they cost so much money.",
                        "stats": null,
                        "reqs": null
                    }
                ]
            },
      {
                "name": "Brightcore Dragon",
                "class": "monsters",
                "level": 5,
                "stats": [40, 27, 14, 37, 23, 8, 1, 1],
                "loot": [
                    {
                        "name": "Brightcore Dragon Soul",
                        "type": "n_consumable",
                        "description": "Brightcore Dragons are usually friendly and guard most cities or villages. Brightcore Dragons are one of the slowest monsters, but trust me when I say they pack a PUNCH. Brightcore Dragon souls can fetches a decent price at the local smith.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     },
     {
                "name": "Shadowcore Dragon",
                "class": "monsters",
                "level": 6,
                "stats": [73, 37, 24, 47, 43, 32, 1, 1],
                "loot": [
                    {
                        "name": "Shadow Soul",
                        "type": "n_consumable",
                        "description": "Shadowcore Dragons are very rare monsters. They are known for their outstanding amount of damage and speed. But they are very dangerous, one incident known as the 'Morioh Case'||yes its copied from jojo|| Shows how dangerous these fellas are.   You can use `.cases` to check it out. Shadow Souls can be used to craft shadow weapons. They can fetch an extremly good price due to how rare it is.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     },
     {
                "name": "Moonbeam Demon",
                "class": "monsters",
                "level": 18,
                "stats": [132, 231, 121, 79, 89, 92, 1, 1],
                "loot": [
                    {
                        "name": "Moonshard",
                        "type": "n_consumable",
                        "description": "Dropped from a Moonbeam Demon. Moonbeam Demons are one of the strongest of the demon class, but they are very rare. One Moonbeam Demon caused one of the most famous incidents. check `.cases` to check it out. This can be drolled on by your local smith for a breathtaking price.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     }
    ],
    "monsters prob": [78, 73, 20, 30, 2, 0.01],
        "encounter rate": 60,
        "swarm size": 5,
        "boss": null,
        "specials": [
            {
                "block": 9,
                "event": "gathering",
                "type": "herbs",
                "items": [
                    {
                        "name": "Bittherb",
                        "type": "n_consumable",
                        "description": "They say it is most bitter herb in the world. Good for making remedies.",
                        "stats": null,
                        "reqs": null
                    },
                    {
                        "name": "Moonflower",
                        "type": "n_consumable",
                        "description": "A flower that grows towards the moon. Often found in forests under tall trees.",
                        "stats": null,
                        "reqs": null
                    },
                    {
                        "name": "Blade Grass",
                        "type": "n_consumable",
                        "description": "Beware cuts. Smiths believe that using it in their fire make their weapons sharper.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Starlight Jar",
                        "type": "n_consumable",
                        "description": "It is believed to be made by god himself. Trapping light from space into many jars. That's also why there isn't much light in space.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Sunflower",
                        "type": "n_consumable",
                        "description": "A flower that grows towards the sun. Having this item grants you good luck.  Often found at landmarks.",
                        "stats": null,
                        "reqs": null
                    }
        ],
                "rates": [63, 18, 28, 10, 2]
            }
        ],
        "narration": {
            "intros": [
                "As {} walked through the vast dark scene, they spotted a wide open clearing.",
                "As {} explored the dark forest, they saw a cluster of tall bushes.",
                "Walking through a patch of tall grass, {} came across a group of tall trees."
            ],
            "continues": [
                "{} decided to move on.",
                "There was nothing more to do there so {} kept on going.",
                "{} caught their breath for a minute, then decided to continue their exploration."
            ],
            "empty": [
                "A carpet of pretty flowers and dark flowers laid there in their sight and their scent filled the air.",
                "The ground was covered in a thick layer of dark grass, sparse with moss covered rocks or branches.",
                "The foliage of the trees blocked most of the sunlight but not as much of the heat.",
                "{} stopped to listen to the noises of nature: birdsongs by the dungeon unique birds.",
                "A bunch of rocks of different sizes could be seen here and there, and covered in dark moss.",
                "A small stream could be seen meandering at the base of what seemed to be a small hill.",
                "There was a huge log in the middle of the clearing, covered in strange mushrooms.",
                "A small breeze rose and blew a bunch of dead leaves all around you but quickly faded away."
            ],
            "fight": [
                "Suddenly, they felt a hostile presence and sure enough {} encountered monsters.",
                "Out of nowhere a group of monsters jumped upon the unsuspecting {}.",
                "{} just had the chance to take their weapons that they were face to face with monsters."
            ],
            "stairs": [
                "They see a weird light pillar a little bit forward and steadily walk toward it.",
                "Upon realizing it is the teleporter that leads back to the city, they happily run to it."
            ],
            "boss room": null,
            "herb point": [
                "{} saw that the whole place was covered in various and diverse herbs.",
                "Certainly gathering herbs here could lead to some results."
            ],
            "wood point": null,
            "mineral point": null,
            "completion": [
                "It is the end of your exploration {}.",
                "You are magically transported back to the city."
            ]
        }
     }
}

#floor three
{
    "floor": {
        "name": "Floor 3",
        "stratum": "Sparky Light Stratum",
        "size": 35,
        "danger": 30,
    "monsters": [
      {
                "name": "Light Green Slime",
                "class": "monster",
                "level": 2,
                "stats": [23, 18, 15, 16, 14, 15, 1, 1],
                "loot": [
                    {
                        "name": "Green Core Fragments",
                        "type": "n_consumable",
                        "description": "Fragments of a Green Slime core. Can be sold for a cheap price.",
                        "stats": null,
                        "reqs": null
                    }
                ]
            },
            {
                "name": "White Punny Bunny",
                "class": "monster",
                "level": 2,
                "stats": [26, 21, 15, 17, 14, 19, 1, 1],
                "loot": [
                    {
                        "name": "Rabbit Pelt",
                        "type": "n_consumable",
                        "description": "\"Neige\" coloured pelt of a freshly skinned Punny Bunny. Fetches a cheap price at the local smith.",
                        "stats": null,
                        "reqs": null
                    } // HP ATK DEF SPATK SPDEF AGI CRIT LUCK 
          //   40, 12, 10, 12, 10, 8, 1, 1
                ]
            },
      {
                "name": "Greater Sparkcore Dragon",
                "class": "monsters",
                "level": 6,
                "stats": [40, 37, 24, 47, 33, 28, 1, 1],
                "loot": [
                    {
                        "name": "Dragon Soul",
                        "type": "n_consumable",
                        "description": "Nobody knows where the Sparkcore Dragons come from. But the souls that drop from them are used for crafing gear at most places. They are very rare to find these days because they cost so much money.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Light Cache",
                        "type": "n_consumable",
                        "description": "Chest that can be found near end of dungeons or can be dropped from Sparkcore Dragons.",
                        "stats": null,
                        "reqs": null
                    }
                ]
            },
      {
                "name": "Brightcore Dragon",
                "class": "monsters",
                "level": 6,
                "stats": [43, 30, 17, 40, 26, 11, 1, 1],
                "loot": [
                    {
                        "name": "Brightcore Dragon Soul",
                        "type": "n_consumable",
                        "description": "Brightcore Dragons are usually friendly and guard most cities or villages. Brightcore Dragons are one of the slowest monsters, but trust me when I say they pack a PUNCH. Brightcore Dragon souls can fetches a decent price at the local smith.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     },
     {
                "name": "Shadowcore Dragon",
                "class": "monsters",
                "level": 6,
                "stats": [73, 37, 24, 47, 43, 32, 1, 1],
                "loot": [
                    {
                        "name": "Shadow Soul",
                        "type": "n_consumable",
                        "description": "Shadowcore Dragons are very rare monsters. They are known for their outstanding amount of damage and speed. But they are very dangerous, one incident known as the 'Morioh Case'||yes its copied from jojo|| Shows how dangerous these fellas are.   You can use `.cases` to check it out. Shadow Souls can be used to craft shadow weapons. They can fetch an extremly good price due to how rare it is.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     },
     {
                "name": "Moonbeam Demon",
                "class": "monsters",
                "level": 18,
                "stats": [132, 231, 121, 79, 89, 92, 1, 1],
                "loot": [
                    {
                        "name": "Moonshard",
                        "type": "n_consumable",
                        "description": "Dropped from a Moonbeam Demon. Moonbeam Demons are one of the strongest of the demon class, but they are very rare. One Moonbeam Demon caused one of the most famous incidents. check `.cases` to check it out. This can be drolled on by your local smith for a breathtaking price.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     }
    ],
    "monsters prob": [80, 77, 23, 33, 5, 0.1],
        "encounter rate": 60,
        "swarm size": 5,
        "boss": null,
        "specials": [
            {
                "block": 9,
                "event": "gathering",
                "type": "herbs",
                "items": [
                    {
                        "name": "Bittherb",
                        "type": "n_consumable",
                        "description": "They say it is most bitter herb in the world. Good for making remedies.",
                        "stats": null,
                        "reqs": null
                    },
                    {
                        "name": "Moonflower",
                        "type": "n_consumable",
                        "description": "A flower that grows towards the moon. Often found in forests under tall trees.",
                        "stats": null,
                        "reqs": null
                    },
                    {
                        "name": "Blade Grass",
                        "type": "n_consumable",
                        "description": "Beware cuts. Smiths believe that using it in their fire make their weapons sharper.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Starlight Jar",
                        "type": "n_consumable",
                        "description": "It is believed to be made by god himself. Trapping light from space into many jars. That's also why there isn't much light in space.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Sunflower",
                        "type": "n_consumable",
                        "description": "A flower that grows towards the sun. Having this item grants you good luck.  Often found at landmarks.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Light Cache",
                        "type": "n_consumable",
                        "description": "Chest that can be found near end of dungeons or can be dropped from Sparkcore Dragons.",
                        "stats": null,
                        "reqs": null
                    }
        ],
                "rates": [65, 20, 30, 13, 5, 5]
            }
        ],
        "narration": {
            "intros": [
                "As {} walked through the vast bright scene, they spotted a wide open clearing.",
                "As {} explored the bright forest, they saw a cluster of tall bushes.",
                "Walking through a patch of tall white grass, {} came across a group of tall trees."
            ],
            "continues": [
                "{} decided to move on.",
                "There was nothing more to do there so {} kept on going.",
                "{} caught their breath for a minute, then decided to continue their exploration."
            ],
            "empty": [
                "A carpet of pretty flowers and bright white flowers laid there in their sight and their scent filled the air.",
                "The ground was covered in a thick layer of white grass, sparse with moss covered rocks or branches.",
                "The foliage of the trees blocked most of the sunlight but not as much of the heat.",
                "{} stopped to listen to the noises of nature: birdsongs by the dungeon unique birds.",
                "A bunch of rocks of different sizes could be seen here and there, and covered in weird white moss.",
                "A small stream could be seen meandering at the base of what seemed to be a small hill.",
                "There was a huge log in the middle of the clearing, covered in strange sparkling mushrooms.",
                "A small breeze rose and blew a bunch of white leaves all around you but quickly faded away."
            ],
            "fight": [
                "Suddenly, they felt a hostile presence and sure enough {} encountered monsters.",
                "Out of nowhere a group of monsters jumped upon the unsuspecting {}.",
                "{} just had the chance to take their weapons that they were face to face with monsters."
            ],
            "stairs": [
                "They see a weird light pillar a little bit forward and steadily walk toward it.",
                "Upon realizing it is the teleporter that leads back to the city, they happily run to it."
            ],
            "boss room": null,
            "herb point": [
                "{} saw that the whole place was covered in various and diverse herbs.",
                "Certainly gathering herbs here could lead to some results."
            ],
            "wood point": null,
            "mineral point": null,
            "completion": [
                "It is the end of your exploration {}.",
                "You are magically transported back to the city."
            ]
        }
     }
}

#floor four

{
    "floor": {
        "name": "Floor 4",
        "stratum": "Spooky Light Stratum",
        "size": 37,
        "danger": 32,
    "monsters": [
      {
                "name": "Scary Green Slime",
                "class": "monster",
                "level": 2,
                "stats": [23, 18, 15, 16, 14, 15, 1, 1],
                "loot": [
                    {
                        "name": "Green Core Fragments",
                        "type": "n_consumable",
                        "description": "Fragments of a Green Slime core. Can be sold for a cheap price.",
                        "stats": null,
                        "reqs": null
                    }
                ]
            },
            {
                "name": "Ghostly Bunny",
                "class": "monster",
                "level": 2,
                "stats": [26, 21, 15, 17, 14, 19, 1, 1],
                "loot": [
                    {
                        "name": "Rabbit Pelt",
                        "type": "n_consumable",
                        "description": "\"Neige\" coloured pelt of a freshly skinned Punny Bunny. Fetches a cheap price at the local smith.",
                        "stats": null,
                        "reqs": null
                    } // HP ATK DEF SPATK SPDEF AGI CRIT LUCK 
          //   40, 12, 10, 12, 10, 8, 1, 1
                ]
            },
      {
                "name": "Reaper Sparkcore Dragon",
                "class": "monsters",
                "level": 6,
                "stats": [44, 37, 24, 47, 33, 30, 1, 1],
                "loot": [
                    {
                        "name": "Dragon Soul",
                        "type": "n_consumable",
                        "description": "Nobody knows where the Sparkcore Dragons come from. But the souls that drop from them are used for crafing gear at most places. They are very rare to find these days because they cost so much money.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Light Cache",
                        "type": "n_consumable",
                        "description": "Chest that can be found near end of dungeons or can be dropped from Sparkcore Dragons.",
                        "stats": null,
                        "reqs": null
                    }
                ]
            },
      {
                "name": "Spooky Brightcore Dragon",
                "class": "monsters",
                "level": 6,
                "stats": [43, 30, 17, 40, 26, 17, 1, 1],
                "loot": [
                    {
                        "name": "Brightcore Dragon Soul",
                        "type": "n_consumable",
                        "description": "Brightcore Dragons are usually friendly and guard most cities or villages. Brightcore Dragons are one of the slowest monsters, but trust me when I say they pack a PUNCH. Brightcore Dragon souls can fetches a decent price at the local smith.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     },
     {
                "name": "Shadowcore Dragon",
                "class": "monsters",
                "level": 6,
                "stats": [75, 39, 26, 49, 45, 35, 1, 1],
                "loot": [
                    {
                        "name": "Shadow Soul",
                        "type": "n_consumable",
                        "description": "Shadowcore Dragons are very rare monsters. They are known for their outstanding amount of damage and speed. But they are very dangerous, one incident known as the 'Morioh Case'||yes its copied from jojo|| Shows how dangerous these fellas are.   You can use `.cases` to check it out. Shadow Souls can be used to craft shadow weapons. They can fetch an extremly good price due to how rare it is.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     },
     {
                "name": "Moonbeam Demon",
                "class": "monsters",
                "level": 18,
                "stats": [132, 231, 121, 79, 89, 92, 1, 1],
                "loot": [
                    {
                        "name": "Moonshard",
                        "type": "n_consumable",
                        "description": "Dropped from a Moonbeam Demon. Moonbeam Demons are one of the strongest of the demon class, but they are very rare. One Moonbeam Demon caused one of the most famous incidents. check `.cases` to check it out. This can be drolled on by your local smith for a breathtaking price.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     }
    ],
    "monsters prob": [80, 77, 23, 33, 5, 0.1],
        "encounter rate": 60,
        "swarm size": 5,
        "boss": null,
        "specials": [
            {
                "block": 9,
                "event": "gathering",
                "type": "herbs",
                "items": [
                    {
                        "name": "Bittherb",
                        "type": "n_consumable",
                        "description": "They say it is most bitter herb in the world. Good for making remedies.",
                        "stats": null,
                        "reqs": null
                    },
                    {
                        "name": "Moonflower",
                        "type": "n_consumable",
                        "description": "A flower that grows towards the moon. Often found in forests under tall trees.",
                        "stats": null,
                        "reqs": null
                    },
                    {
                        "name": "Blade Grass",
                        "type": "n_consumable",
                        "description": "Beware cuts. Smiths believe that using it in their fire make their weapons sharper.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Starlight Jar",
                        "type": "n_consumable",
                        "description": "It is believed to be made by god himself. Trapping light from space into many jars. That's also why there isn't much light in space.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Sunflower",
                        "type": "n_consumable",
                        "description": "A flower that grows towards the sun. Having this item grants you good luck.  Often found at landmarks.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Light Cache",
                        "type": "n_consumable",
                        "description": "Chest that can be found near end of dungeons or can be dropped from Sparkcore Dragons.",
                        "stats": null,
                        "reqs": null
                    }
        ],
                "rates": [65, 20, 30, 13, 5, 5]
            }
        ],
        "narration": {
            "intros": [
                "As {} walked through the vast bright scene, they spotted a wide open clearing.",
                "As {} explored the bright forest, they saw a cluster of tall bushes.",
                "Walking through a patch of tall white grass, {} came across a group of tall trees."
            ],
            "continues": [
                "{} decided to move on.",
                "There was nothing more to do there so {} kept on going.",
                "{} caught their breath for a minute, then decided to continue their exploration."
            ],
            "empty": [
                "A carpet of pretty flowers and bright white flowers laid there in their sight and their scent filled the air.",
                "The ground was covered in a thick layer of white grass, sparse with moss covered rocks or branches.",
                "The foliage of the trees blocked most of the sunlight but not as much of the heat.",
                "{} stopped to listen to the noises of nature: birdsongs by the dungeon unique birds.",
                "A bunch of rocks of different sizes could be seen here and there, and covered in weird white moss.",
                "A small stream could be seen meandering at the base of what seemed to be a small hill.",
                "There was a huge log in the middle of the clearing, covered in strange sparkling mushrooms.",
                "A small breeze rose and blew a bunch of white leaves all around you but quickly faded away."
            ],
            "fight": [
                "Suddenly, they felt a hostile presence and sure enough {} encountered monsters.",
                "Out of nowhere a group of monsters jumped upon the unsuspecting {}.",
                "{} just had the chance to take their weapons that they were face to face with monsters."
            ],
            "stairs": [
                "They see a weird light pillar a little bit forward and steadily walk toward it.",
                "Upon realizing it is the teleporter that leads back to the city, they happily run to it."
            ],
            "boss room": null,
            "herb point": [
                "{} saw that the whole place was covered in various and diverse herbs.",
                "Certainly gathering herbs here could lead to some results."
            ],
            "wood point": null,
            "mineral point": null,
            "completion": [
                "It is the end of your exploration {}.",
                "You are magically transported back to the city."
            ]
        }
     }
}

#floor five

{
    "floor": {
        "name": "Floor 5",
        "stratum": "Dangerous Dark Stratum",
        "size": 35,
        "danger": 42,
    "monsters": [
      {
                "name": "Light Green Slime",
                "class": "monster",
                "level": 4,
                "stats": [30, 20, 15, 16, 14, 20, 1, 1],
                "loot": [
                    {
                        "name": "Green Core Fragments",
                        "type": "n_consumable",
                        "description": "Fragments of a Green Slime core. Can be sold for a cheap price.",
                        "stats": null,
                        "reqs": null
                    }
                ]
            },
            {
                "name": "White Punny Bunny",
                "class": "monster",
                "level": 3,
                "stats": [29, 23, 15, 17, 14, 24, 1, 1],
                "loot": [
                    {
                        "name": "Rabbit Pelt",
                        "type": "n_consumable",
                        "description": "\"Neige\" coloured pelt of a freshly skinned Punny Bunny. Fetches a cheap price at the local smith.",
                        "stats": null,
                        "reqs": null
                    } // HP ATK DEF SPATK SPDEF AGI CRIT LUCK 
          //   40, 12, 10, 12, 10, 8, 1, 1
                ]
            },
      {
                "name": "Greater Sparkcore Dragon",
                "class": "monsters",
                "level": 6,
                "stats": [43, 40, 27, 47, 33, 28, 1, 1],
                "loot": [
                    {
                        "name": "Dragon Soul",
                        "type": "n_consumable",
                        "description": "Nobody knows where the Sparkcore Dragons come from. But the souls that drop from them are used for crafing gear at most places. They are very rare to find these days because they cost so much money.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Light Cache",
                        "type": "n_consumable",
                        "description": "Chest that can be found near end of dungeons or can be dropped from Sparkcore Dragons.",
                        "stats": null,
                        "reqs": null
                    }
                ]
            },
      {
                "name": "Brightcore Dragon",
                "class": "monsters",
                "level": 6,
                "stats": [43, 30, 17, 40, 26, 8, 1, 1],
                "loot": [
                    {
                        "name": "Brightcore Dragon Soul",
                        "type": "n_consumable",
                        "description": "Brightcore Dragons are usually friendly and guard most cities or villages. Brightcore Dragons are one of the slowest monsters, but trust me when I say they pack a PUNCH. Brightcore Dragon souls can fetches a decent price at the local smith.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Brightcore Cache",
                        "type": "n_consumable",
                        "description": "Chest that can be found near end of dungeons or can be dropped from Brightcore Dragons.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     },
     {
                "name": "Shadowcore Dragon",
                "class": "monsters",
                "level": 6,
                "stats": [73, 37, 24, 47, 43, 32, 1, 1],
                "loot": [
                    {
                        "name": "Shadow Soul",
                        "type": "n_consumable",
                        "description": "Shadowcore Dragons are very rare monsters. They are known for their outstanding amount of damage and speed. But they are very dangerous, one incident known as the 'Morioh Case'||yes its copied from jojo|| Shows how dangerous these fellas are.   You can use `.cases` to check it out. Shadow Souls can be used to craft shadow weapons. They can fetch an extremly good price due to how rare it is.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Shadowcore Titan Cache",
                        "type": "n_consumable",
                        "description": "Chest that can be found near end of dungeons or can be dropped from Shadowcore Dragons. They have a chance to drop extremely good stuff. and if your lucky a moonshard.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     },
     {
                "name": "Moonbeam Demon",
                "class": "monsters",
                "level": 18,
                "stats": [132, 231, 121, 79, 89, 92, 1, 1],
                "loot": [
                    {
                        "name": "Moonshard",
                        "type": "n_consumable",
                        "description": "Dropped from a Moonbeam Demon. Moonbeam Demons are one of the strongest of the demon class, but they are very rare. One Moonbeam Demon caused one of the most famous incidents. check `.cases` to check it out. This can be drolled on by your local smith for a breathtaking price.",
                        "stats": null,
                        "reqs": null
                    }
                ]
     },
     {
                "name": "Starlight Demon",
                "class": "monsters",
                "level": 18,
                "stats": [132, 231, 121, 79, 89, 92, 1, 1],
                "loot": [
          {
                        "name": "Starlight God Cache",
                        "type": "n_consumable",
                        "description": "Chest that can be found near end of dungeons or can be dropped from Starlight Dragons. They have a chance to drop extremely good stuff. and if your lucky a moonshard or a Starlight weapon.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Starlight Jar",
                        "type": "consumable",
                        "description": "It is believed to be made by god himself. Trapping light from space into a ginat jar. The angels in space made it into smaller jars. That's also why there isn't much light in space.",
                        "stats": null,
                        "reqs": null
                    }
        ]
     }
    ], 
    "monsters prob": [84, 77, 23, 33, 9, 0.1,14],
        "encounter rate": 70,
        "swarm size": 5,
        "boss": null,
        "specials": [
            {
                "block": 9,
                "event": "gathering",
                "type": "herbs",
                "items": [
                    {
                        "name": "Bittherb",
                        "type": "n_consumable",
                        "description": "They say it is most bitter herb in the world. Good for making remedies.",
                        "stats": null,
                        "reqs": null
                    },
                    {
                        "name": "Moonflower",
                        "type": "n_consumable",
                        "description": "A flower that grows towards the moon. Often found in forests under tall trees.",
                        "stats": null,
                        "reqs": null
                    },
                    {
                        "name": "Blade Grass",
                        "type": "n_consumable",
                        "description": "Beware cuts. Smiths believe that using it in their fire make their weapons sharper.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Starlight Jar",
                        "type": "n_consumable",
                        "description": "It is believed to be made by god himself. Trapping light from space into a ginat jar. The angels in space made it into smaller jars. That's also why there isn't much light in space.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Sunflower",
                        "type": "n_consumable",
                        "description": "A flower that grows towards the sun. Having this item grants you good luck.  Often found at landmarks.",
                        "stats": null,
                        "reqs": null
                    },
          {
                        "name": "Light Cache",
                        "type": "n_consumable",
                        "description": "Chest that can be found near end of dungeons or can be dropped from Sparkcore Dragons.",
                        "stats": null,
                        "reqs": null
                    }
        ],
                "rates": [65, 20, 30, 13, 5, 5]
            }
        ],
        "narration": {
            "intros": [
                "As {} walked through the vast bright scene, they spotted a wide open clearing.",
                "As {} explored the bright forest, they saw a cluster of tall bushes.",
                "Walking through a patch of tall white grass, {} came across a group of tall trees."
            ],
            "continues": [
                "{} decided to move on.",
                "There was nothing more to do there so {} kept on going.",
                "{} caught their breath for a minute, then decided to continue their exploration."
            ],
            "empty": [
                "A carpet of pretty flowers and bright white flowers laid there in their sight and their scent filled the air.",
                "The ground was covered in a thick layer of white grass, sparse with moss covered rocks or branches.",
                "The foliage of the trees blocked most of the sunlight but not as much of the heat.",
                "{} stopped to listen to the noises of nature: birdsongs by the dungeon unique birds.",
                "A bunch of rocks of different sizes could be seen here and there, and covered in weird white moss.",
                "A small stream could be seen meandering at the base of what seemed to be a small hill.",
                "There was a huge log in the middle of the clearing, covered in strange sparkling mushrooms.",
                "A small breeze rose and blew a bunch of white leaves all around you but quickly faded away."
            ],
            "fight": [
                "Suddenly, they felt a hostile presence and sure enough {} encountered monsters.",
                "Out of nowhere a group of monsters jumped upon the unsuspecting {}.",
                "{} just had the chance to take their weapons that they were face to face with monsters."
            ],
            "stairs": [
                "They see a weird light pillar a little bit forward and steadily walk toward it.",
                "Upon realizing it is the teleporter that leads back to the city, they happily run to it."
            ],
            "boss room": null,
            "herb point": [
                "{} saw that the whole place was covered in various and diverse herbs.",
                "Certainly gathering herbs here could lead to some results."
            ],
            "wood point": null,
            "mineral point": null,
            "completion": [
                "It is the end of your exploration {}.",
                "You are magically transported back to the city."
            ]
        }
     }   
}
dnglokpor commented 3 years ago

Hey I am being quite busy so excuse the late responses. I see you expanded the dungeon to 5 floors. I didn't really read through the json properly but you mention that each floor is in its own file and that would make sense since the exploration code will look for each separately and can only parse one dungeon at the time. Thanks for sharing the code back with me. To be honest, my objective was met once the code could run and interact with discord so I am forever done with this project. I don't know what made you clone it but feel free to expand it as much as you want. Also be aware that I think the code for gathering blocks has an error in it and so (just as most of the code) it needs some debug.

I think this issue should be resolved; am I right?

clarinetandmonkey commented 3 years ago

Yes, but why this is a great project I don't know why you wouldn't want to keep it. And I chose it because I really needed my bot to have some spark in it. So I looked for an rpg bot thing and yours interested me so I decided i'll try it. And no I still have the "Narrate() missing positional argument description"

On Tue, Mar 16, 2021 at 6:30 PM Delwys Glokpor @.***> wrote:

Hey I am being quite busy so excuse the late responses. I see you expanded the dungeon to 5 floors. I didn't really read through the json properly but you mention that each floor is in its own file and that would make sense since the exploration code will look for each separately and can only parse one dungeon at the time. Thanks for sharing the code back with me. To be honest, my objective was met once the code could run and interact with discord so I am forever done with this project. I don't know what made you clone it but feel free to expand it as much as you want. Also be aware that I think the code for gathering blocks has an error in it and so (just as most of the code) it needs some debug.

I think this issue should be resolved; am I right?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dnglokpor/IsekaiBot/issues/2#issuecomment-800655816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQV53MYVWYB3VYCGXOK7HIDTD7LWVANCNFSM4ZCIRUIA .

-- In Cumberland County Schools we practice and require the three W’s:  Wear a mask. Wait 6 feet from others. Wash your hands.

This email is for the sole use of the individual for whom it is intended. If you are neither the intended recipient, nor agent responsible for delivering this email to the intended recipient, any disclosure, re-transmission, copying, or reliance on the information contained herein is prohibited. If you have received this email in error, please notify the person transmitting the correspondence immediately. All email correspondence to and from this email may be subject to disclosure to any third party upon request, including the media. It shall not be necessary to disclose: 1) Email correspondence which does not constitute a Public Record as defined under N.C.G.S. §132.1 or; 2) a public record which is exempt from disclosure under other applicable State or Federal law.

clarinetandmonkey commented 3 years ago

Ok i fixed that, but it keeps saying you are not yet a traveler even tho I am

clarinetandmonkey commented 3 years ago

Nevermind, it's not fixed I really need help because no matter what I do it doesn't work I have two errors.

It keeps saying i'm not a traveler every time I do a command where you have to be a traveler

and it says

Narrate() missing positional argument description

code:


async def narrate(channel,description):
    '''description can be either a string of a list of strings.'''
    if type(description) == str:
        # print(description)
        await asyncio.sleep(2)
        await channel.send(description)
    elif type(description == list): # for lists
        await asyncio.sleep(2)
        for num, sentence in enumerate(description):
            await channel.send(sentence)
            await asyncio.sleep(2)
    else:
        print("Nothing to say.")
clarinetandmonkey commented 3 years ago

Alright how do I change the stuff so it won't spam a bunch of messages and I want to make sure they are in an embed. How can I do this?


async def narrate(channel,description):
    '''description can be either a string of a list of strings.'''
    if type(description) == str:
        # print(description)
        await asyncio.sleep(2)
        await channel.send(description)
    elif type(description == list): # for lists
        await asyncio.sleep(2)
        for num, sentence in enumerate(description):
            await channel.send(sentence)
            await asyncio.sleep(2)
    else:
        print("Nothing to say.")``` i want to make it so that it sends the list and stuff in one thing in an embed to be exact.
dnglokpor commented 3 years ago

Nevermind, it's not fixed I really need help because no matter what I do it doesn't work I have two errors.

It keeps saying i'm not a traveler every time I do a command where you have to be a traveler

and it says

Narrate() missing positional argument description

code:

async def narrate(channel,description):
    '''description can be either a string of a list of strings.'''
    if type(description) == str:
        # print(description)
        await asyncio.sleep(2)
        await channel.send(description)
    elif type(description == list): # for lists
        await asyncio.sleep(2)
        for num, sentence in enumerate(description):
            await channel.send(sentence)
            await asyncio.sleep(2)
    else:
        print("Nothing to say.")

Hey,

So I believe I already answered that question but Narrate expects that you pass the channel to it. Normally my code always gets the channel first and pass it to narrate. Without it your bot won't know what channel to post in. You need to pass it a channel and the message.

dnglokpor commented 3 years ago

Alright how do I change the stuff so it won't spam a bunch of messages and I want to make sure they are in an embed. How can I do this?

async def narrate(channel,description):
    '''description can be either a string of a list of strings.'''
    if type(description) == str:
        # print(description)
        await asyncio.sleep(2)
        await channel.send(description)
    elif type(description == list): # for lists
        await asyncio.sleep(2)
        for num, sentence in enumerate(description):
            await channel.send(sentence)
            await asyncio.sleep(2)
    else:
        print("Nothing to say.")``` i want to make it so that it sends the list and stuff in one thing in an embed to be exact.

Narrate expects description to be either a list or a string. If you send a list, you get each string sent successively. But if you want all in one message you must send a string.

If you're still using the narrations in my dungeon (that I declared as lists of strings) then you can use the str.join() method to concatenate them together into one message but this is costly cause you'll have to do it for every place where narrate is called. Another easier way would be to consolidate the json layout for the narrations from lists into strings. In that case I think you only need to deal with the code that import the json to make sure that it expects strings and not lists.

Does that answer your question?

dnglokpor commented 3 years ago

Ok i fixed that, but it keeps saying you are not yet a traveler even tho I am

The bot keeps two records of travelers: a list that saves each users and users permission level: users.json. It's not in my repos because it contains information about me and my friends who helped me set the bot up. It's json so not encrypted. I couldn't add it. Make sure that file is being created and that ot tracks any new player.

The second thing is the save file. Save files namez contain the username of the player so if it is found, then you can't register. That's something I should have tweaked but never got to it. Also save files are configured to only be written to disk when the bot dies (you kill it with admin permission or on fatal error).

Make sure that every new player gets saved in users.json and have their username.isav under "cartridges/".

dnglokpor commented 3 years ago

Yes, but why this is a great project I don't know why you wouldn't want to keep it. And I chose it because I really needed my bot to have some spark in it. So I looked for an rpg bot thing and yours interested me so I decided i'll try it. And no I still have the "Narrate() missing positional argument description" On Tue, Mar 16, 2021 at 6:30 PM Delwys Glokpor @.**> wrote: Hey I am being quite busy so excuse the late responses. I see you expanded the dungeon to 5 floors. I didn't really read through the json properly but you mention that each floor is in its own file and that would make sense since the exploration code will look for each separately and can only parse one dungeon at the time. Thanks for sharing the code back with me. To be honest, my objective was met once the code could run and interact with discord so I am forever done with this project. I don't know what made you clone it but feel free to expand it as much as you want. Also be aware that I think the code for gathering blocks has an error in it and so (just as most of the code) it needs some debug. I think this issue should be resolved; am I right? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#2 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQV53MYVWYB3VYCGXOK7HIDTD7LWVANCNFSM4ZCIRUIA . -- In Cumberland County Schools we practice and require the three W’s:  Wear a mask. Wait 6 feet from others. Wash* your hands. This email is for the sole use of the individual for whom it is intended. If you are neither the intended recipient, nor agent responsible for delivering this email to the intended recipient, any disclosure, re-transmission, copying, or reliance on the information contained herein is prohibited. If you have received this email in error, please notify the person transmitting the correspondence immediately. All email correspondence to and from this email may be subject to disclosure to any third party upon request, including the media. It shall not be necessary to disclose: 1) Email correspondence which does not constitute a Public Record as defined under N.C.G.S. §132.1 or; 2) a public record which is exempt from disclosure under other applicable State or Federal law.

And finally to answer the question as to why I gave up on the project, there are multiple reasons but mostly:

To be honest I wouldn't mind getting back at this project. I learned in the last year and I now have the knowledge to make it even better. But that would require quite some work that I am not sure I have in me. I hope this answers your question.

clarinetandmonkey commented 3 years ago

Thank you so much. I have fixed the spam issue but is there a way I can make it so I don't have to clear the users.json file everytime i restart the bot for updates. This will be very useful in the future that way when more than 1 person is using my bot they can continue their game without having to restart?

dnglokpor commented 3 years ago

Thank you so much. I have fixed the spam issue but is there a way I can make it so I don't have to clear the users.json file everytime i restart the bot for updates. This will be very useful in the future that way when more than 1 person is using my bot they can continue their game without having to restart?

users.json shouldn't be modified unless you want to edit the list of players. For example you want a player to restart their adventure so you remove their name. Updates to the code shouldn't need a change in users.json.

clarinetandmonkey commented 3 years ago

No I mean I have to restart the bot to update it when I update any code. But when I restart the bot it clears everything.

dnglokpor commented 3 years ago

No I mean I have to restart the bot to update it when I update any code. But when I restart the bot it clears everything.

That shouldn't happen. Unless you manually erase save files and the users log, they shouldn't be erased. Did you change any of the save/load code?

clarinetandmonkey commented 3 years ago

Hey i'm back! And no I don't think I changed any of the code... I only changed most of the names and stuff but other than that yeah.

Also can you give me an example for what you meant when you said str.join()