> For the complete documentation index, see [llms.txt](https://neiizun.gitbook.io/lightdrop/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://neiizun.gitbook.io/lightdrop/usage/stores.md).

# Stores

Stores are a way to share data between Commands and ExceptionHandlers.<br>

```java
LightDrop lightDrop = new LightDrop().hook(jda)
    .map(new MyCommand());
```

Create a store.

```java
Store ageStore = lightDrop.getStoreCluster().newStore("planetsAge");

ageStore.write("earth", "4,543 billion");
```

Get data from a store in a command.

```java
public class MyCommand {
    @Command(name = "earthage")
    public void test(CommandContext context) {
        context.getChannel().sendMessage("The age of the earth is " + context.getStore("planetsAge").readString("earth"));
    }
}
```
