Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add data command #74

Merged
merged 2 commits into from
Oct 21, 2023
Merged

feat: add data command #74

merged 2 commits into from
Oct 21, 2023

Conversation

StrangeGirlMurph
Copy link
Member

No description provided.


async execute(interaction: ChatInputCommandInteraction): Promise<void> {
if (await hasAdminRole(interaction)) {
await interaction.reply({ files: ["./data/enmap.sqlite"], ephemeral: true });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather export the databases and send json because sending the sqlite file will result in impartial data due to write ahead logging and other such magic.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work? Also I do want the sqlite file as well to be able to easily plug it into my current dev version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then also send the -wal and -shm files

Copy link
Member Author

@StrangeGirlMurph StrangeGirlMurph Oct 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done but now that you've mentioned it I think json export would be cool too.
(found it: https://enmap.evie.dev/api/#enmapexport--string)

@StrangeGirlMurph StrangeGirlMurph merged commit 27b467a into main Oct 21, 2023
4 checks passed
@StrangeGirlMurph StrangeGirlMurph deleted the feat/data branch October 21, 2023 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants