From 20c84eb71345d66c636fd75d289fcea09fd1f8e3 Mon Sep 17 00:00:00 2001 From: Noi Date: Mon, 23 Jan 2023 20:26:23 -0800 Subject: [PATCH 1/3] First commit; Jekyll-based documentation page --- BirthdayBot.csproj | 4 ++ Docs/.gitignore | 9 +++++ Docs/Gemfile | 4 ++ Docs/Gemfile.lock | 82 ++++++++++++++++++++++++++++++++++++++ Docs/_config.yml | 25 ++++++++++++ Readme.md => Docs/index.md | 10 +++-- 6 files changed, 130 insertions(+), 4 deletions(-) create mode 100644 Docs/.gitignore create mode 100644 Docs/Gemfile create mode 100644 Docs/Gemfile.lock create mode 100644 Docs/_config.yml rename Readme.md => Docs/index.md (93%) diff --git a/BirthdayBot.csproj b/BirthdayBot.csproj index bfda17f..023d335 100644 --- a/BirthdayBot.csproj +++ b/BirthdayBot.csproj @@ -36,4 +36,8 @@ + + Docs/**;$(DefaultItemExcludes) + + diff --git a/Docs/.gitignore b/Docs/.gitignore new file mode 100644 index 0000000..f07bd2e --- /dev/null +++ b/Docs/.gitignore @@ -0,0 +1,9 @@ +_site +.sass-cache +.jekyll-cache +.jekyll-metadata +vendor + +# Sourced externally; cautiously excluding from repo +# Get it from https://www.flaticon.com/free-icon/birthday-cake_168532 +birthday-cake.png \ No newline at end of file diff --git a/Docs/Gemfile b/Docs/Gemfile new file mode 100644 index 0000000..35d6a52 --- /dev/null +++ b/Docs/Gemfile @@ -0,0 +1,4 @@ +source "https://rubygems.org" +gem "jekyll", "~> 4.3.2" +gem "jekyll-remote-theme" +gem "jekyll-seo-tag" diff --git a/Docs/Gemfile.lock b/Docs/Gemfile.lock new file mode 100644 index 0000000..43cb228 --- /dev/null +++ b/Docs/Gemfile.lock @@ -0,0 +1,82 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) + colorator (1.1.0) + concurrent-ruby (1.1.10) + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + eventmachine (1.2.7) + ffi (1.15.5) + forwardable-extended (2.6.0) + google-protobuf (3.21.12-x86_64-linux) + http_parser.rb (0.8.0) + i18n (1.12.0) + concurrent-ruby (~> 1.0) + jekyll (4.3.2) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 1.0) + jekyll-sass-converter (>= 2.0, < 4.0) + jekyll-watch (~> 2.0) + kramdown (~> 2.3, >= 2.3.1) + kramdown-parser-gfm (~> 1.0) + liquid (~> 4.0) + mercenary (>= 0.3.6, < 0.5) + pathutil (~> 0.9) + rouge (>= 3.0, < 5.0) + safe_yaml (~> 1.0) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) + jekyll-remote-theme (0.4.3) + addressable (~> 2.0) + jekyll (>= 3.5, < 5.0) + jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) + rubyzip (>= 1.3.0, < 3.0) + jekyll-sass-converter (3.0.0) + sass-embedded (~> 1.54) + jekyll-seo-tag (2.8.0) + jekyll (>= 3.8, < 5.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.4) + listen (3.8.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.4.0) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (5.0.1) + rake (13.0.6) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) + rexml (3.2.5) + rouge (4.0.1) + rubyzip (2.3.2) + safe_yaml (1.0.5) + sass-embedded (1.57.1) + google-protobuf (~> 3.21) + rake (>= 10.0.0) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + unicode-display_width (2.4.2) + webrick (1.7.0) + +PLATFORMS + x86_64-linux + +DEPENDENCIES + jekyll (~> 4.3.2) + jekyll-remote-theme + jekyll-seo-tag + +BUNDLED WITH + 2.4.5 diff --git a/Docs/_config.yml b/Docs/_config.yml new file mode 100644 index 0000000..88faba3 --- /dev/null +++ b/Docs/_config.yml @@ -0,0 +1,25 @@ +# https://github.com/BDHU/minimalist +title: Birthday Bot +description: A social time zone reference tool! +logo: /birthday-cake.png +show_downloads: false +remote_theme: BDHU/minimalist +color-scheme: dark + +plugins: + - jekyll-remote-theme + +# https://icon-sets.iconify.design/ +sidebar: + - name: Invite the bot + icon: + link: https://discord.com/api/oauth2/authorize?client_id=470673087671566366&permissions=268451840&scope=bot%20applications.commands + - name: Official server + icon: + link: https://discord.gg/JCRyFk7 + - name: GitHub + icon: + link: https://github.com/NoiTheCat/BirthdayBot + - name: Support me on Ko-fi + icon: + link: https://ko-fi.com/noithecat \ No newline at end of file diff --git a/Readme.md b/Docs/index.md similarity index 93% rename from Readme.md rename to Docs/index.md index 26b0cb1..0da5fca 100644 --- a/Readme.md +++ b/Docs/index.md @@ -1,8 +1,10 @@ +--- +layout: default +title: Documentation +--- # Birthday Bot -* Info: https://discord.bots.gg/bots/470673087671566366 - -## Recognize birthdays in your Discord community! +**Recognize birthdays in your Discord community!** Birthday Bot is a simple, single-purpose bot. It will set a role on your users for the duration of their birthdays and, if desired, can announce a message in a channel of your choosing. Server owners can further specify a default time zone, with individual users also setting @@ -49,4 +51,4 @@ server they share with the bot for the servers they wish for it to be known in. Any questions and concerns regarding data and security may be sent to the bot author via the support server or GitHub. #### Image credit -The icon used by this bot is from Flaticon, found at: https://www.flaticon.com/free-icon/birthday-cake_168532 \ No newline at end of file +Cake icons created by Freepik - Flaticon \ No newline at end of file From 088a465443d1f880500afe5196153ab6d1456c04 Mon Sep 17 00:00:00 2001 From: Noi Date: Tue, 24 Jan 2023 19:18:41 -0800 Subject: [PATCH 2/3] Update documentation site text Similar format to World Time's page --- Docs/_config.yml | 2 +- Docs/index.md | 54 +++++++++++++++++------------------------------- 2 files changed, 20 insertions(+), 36 deletions(-) diff --git a/Docs/_config.yml b/Docs/_config.yml index 88faba3..10bd6e1 100644 --- a/Docs/_config.yml +++ b/Docs/_config.yml @@ -1,6 +1,6 @@ # https://github.com/BDHU/minimalist title: Birthday Bot -description: A social time zone reference tool! +description: An automated way to recognize birthdays in your community! logo: /birthday-cake.png show_downloads: false remote_theme: BDHU/minimalist diff --git a/Docs/index.md b/Docs/index.md index 0da5fca..97f6fb3 100644 --- a/Docs/index.md +++ b/Docs/index.md @@ -4,51 +4,35 @@ title: Documentation --- # Birthday Bot -**Recognize birthdays in your Discord community!** +**An automated way to recognize birthdays in your community!** -Birthday Bot is a simple, single-purpose bot. It will set a role on your users for the duration of their birthdays and, if desired, can -announce a message in a channel of your choosing. Server owners can further specify a default time zone, with individual users also setting -their own to ensure everyone's birthdays are recognized precisely on time. +Birthday Bot is a utility for your community which enables your users to share their birthdays, check birthdays of others, and mark and announce birthdays as they happen. Server moderators can additionally set up a default time zone with users having the option to set their own, ensuring all birthdays are recognized precisely on time. -#### Getting started -This bot requires a small amount of initial set-up before it's ready for use. To quickly get started, ensure that you: +### Getting started +Invite the bot via the link on the sidebar. Please note that several permissions are requested during the invite process which are required for the bot to function properly. + +Once added, a small amount of initial set-up before it's ready for use: * Create a dedicated birthday role to be used only by the bot. Ensure the new role is placed beneath the bot's own role. - * **Do not use an existing role!** This bot assumes exclusive control over it. Users that have the role but are not having a birthday - *will* be removed from it! * Instruct the bot to use the role: `/config role set-birthday-role` -At this point, you may also wish to do the following optional steps: +>

Do not use an existing role! This bot will take full and exclusive control over it. Users that have the role but are not having a birthday + *will* be removed from it!

+ +Optional, but recommended: +* Customize the announcement message: See `/config announce help` for more information. * Set the birthday announcement channel: `/config announce set-channel` * Set a default time zone: `/config set-timezone` -* Customize the announcement message: See `/config announce help` for more information. -#### Time zone support -You may specify a time zone in order to have your birthday recognized with respect to your local time. This bot only accepts zone names -from the IANA Time Zone Database (a.k.a. Olson Database). -* To find your zone: https://xske.github.io/tz/ -* Interactive map: https://kevinnovak.github.io/Time-Zone-Picker/ -* Complete list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones +### Supporting the bot +Birthday Bot is provided for free, period. No paywalled features, subscriptions, or monetization insentices. This is an independent hobby project done in my spare time, and all costs associated with it come out of my pocket. My only interest is to provide something that I hope others find as useful as I do. -#### Support the bot -Birthday Bot is and shall remain fully free to use. I have no plans to hide any new or existing features behind pay-only, premium features. -This is an independent hobby project and all costs associated with it come out of my pocket. +That said, this bot has proven to be far more popular than I ever anticipated, and keeping things running has occasionally strained me both financially and time-wise. If you'd like, please consider pitching in a bit to cover my recurring costs by checking out my Ko-fi page on the sidebar. -This bot has had a far greater response than I've ever expected, and at this point I find it difficult to pay for the server it runs on as -its resource needs grow. I would greatly appreciate if you consider pitching in a little bit to cover my recurring costs by checking out my -Ko-fi page: https://ko-fi.com/noithecat. +### Privacy and Security +This bot collects and stores only information necessary for its operation, then associated to user, server, and role IDs. As little information is stored as possible and access to the database is strongly restricted through proper security practices. -#### Support, Privacy and Security -The support server for my bots can be accessed via the given link: https://discord.gg/JCRyFk7. Further information in setting up the bot -can be found within it, as well as a small group of volunteers who are willing to answer questions. +Birthday information is not shared between servers *by design*, for those preferring to be selective about where they want their information known. Users must set their birthday settings in each individual server. -This bot collects and stores only information necessary for its operation, including user, server, and role IDs. This data is not stored -indefinitely, but is removed after an extended period of lack of use. If an individual member of a server is not seen after 360 days, their -data is purged. If the bot has been removed from a server, all data (including of its associated users) is purged after 180 days. +Any questions and concerns regarding data privacy, security, and retention may be sent to the bot author via the support server or by opening an issue on GitHub. -Birthdays are not shared between servers that this same bot may be in. This is *by design*, for those preferring to share their birthdays -with only certain communities instead of automatically sharing it to all of them. Users must enter their birthday information onto every -server they share with the bot for the servers they wish for it to be known in. - -Any questions and concerns regarding data and security may be sent to the bot author via the support server or GitHub. - -#### Image credit +### Image credit Cake icons created by Freepik - Flaticon \ No newline at end of file From 1f472b977383132c2644a829a76f8df4cc2e4b63 Mon Sep 17 00:00:00 2001 From: Noi Date: Tue, 24 Jan 2023 19:56:21 -0800 Subject: [PATCH 3/3] 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..423731f --- /dev/null +++ b/Readme.md @@ -0,0 +1,37 @@ +# Birthday Bot +An automated way to recognize birthdays in your community! + +[![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/BirthdayBot) +* [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": "birthdaybot", // optional + "SqlUser": "birthdaybot", // required + "SqlPassword": "birthdaybot" // 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