From 45c2c5f4a65e0d101879765c7b7accf7ad5ed819 Mon Sep 17 00:00:00 2001 From: Noi Date: Sun, 22 Jan 2023 18:50:19 -0800 Subject: [PATCH] Add project-centric readme --- Readme.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Readme.md diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..de416fe --- /dev/null +++ b/Readme.md @@ -0,0 +1,37 @@ +# World Time +A social time zone reference tool! + +[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/J3J65TW2E) + +#### Documentation, help, resources +* [Main website, user documentation](https://noithecat.dev/bots/WorldTime) +* [Official server](https://discord.gg/JCRyFk7) + +#### Running your own instance +You need: +* .NET 6 (https://dotnet.microsoft.com/en-us/) +* PostgreSQL (https://www.postgresql.org/) +* EF Core tools (https://learn.microsoft.com/en-us/ef/core/get-started/overview/install#get-the-entity-framework-core-tools) +* A Discord bot token (https://discord.com/developers/applications) + +Get your bot token and set up your database user and schema, then create a JSON file containing the following: +```jsonc +{ + "BotToken": "your bot token here", + "SqlHost": "localhost", // optional + "SqlDatabase": "worldtime", // optional + "SqlUser": "worldtime", // required + "SqlPassword": "mypassword" // required; no other authentication methods are currently supported +} +``` + +Then run the following commands: +```sh +$ dotnet restore +$ dotnet ef database update -- -c path/to/config.json +``` + +And finally, to run the bot: +``` +$ dotnet run -c Release -- -c path/to/config.json +``` \ No newline at end of file