From 51235948ee734d59ee5a965be703e4a706d08e3d Mon Sep 17 00:00:00 2001 From: Adam Gauthier Date: Tue, 5 Dec 2023 19:31:59 -0800 Subject: [PATCH] bump version to 1.19.0 --- docs/release-notes/1.19.0_changelog.md | 21 +++++++++++++++++++ .../deploy/0043_bump_version_1.19.0.sql | 15 +++++++++++++ .../revert/0043_bump_version_1.19.0.sql | 15 +++++++++++++ src/taylorbot-postgres/sqitch/sqitch.plan | 1 + .../verify/0043_bump_version_1.19.0.sql | 18 ++++++++++++++++ .../attributes/IntegerUserAttribute.ts | 21 ------------------- 6 files changed, 70 insertions(+), 21 deletions(-) create mode 100644 docs/release-notes/1.19.0_changelog.md create mode 100644 src/taylorbot-postgres/sqitch/deploy/0043_bump_version_1.19.0.sql create mode 100644 src/taylorbot-postgres/sqitch/revert/0043_bump_version_1.19.0.sql create mode 100644 src/taylorbot-postgres/sqitch/verify/0043_bump_version_1.19.0.sql delete mode 100644 src/taylorbot-typescript/attributes/IntegerUserAttribute.ts diff --git a/docs/release-notes/1.19.0_changelog.md b/docs/release-notes/1.19.0_changelog.md new file mode 100644 index 000000000..3885a7fb4 --- /dev/null +++ b/docs/release-notes/1.19.0_changelog.md @@ -0,0 +1,21 @@ +# TaylorBot v1.19.0 Release Notes 📝 + +- Added **/server joined** command! 🚪 + - This command tracks and shows a member's first joined date in the current server 👀 + - Use **/server timeline** to get a chronological timeline of the first members who joined the server 📜 + - These commands replace **Joined** and **RankJoined** ♻️ + +- Added **/server messages** and **/server minutes** commands! ⏳ + - These commands are used to see a member's amount of messages sent and minutes of activity in a server ✍️ + - Use **/server leaderboard** to get a leaderboard of minutes or messages for the current server 🎖️ + - These commands replace **Messages**, **Minutes**, **RankMessages** and **RankMinutes** ♻️ + +- Added **/favorite** commands! 💞 + - Use **/favorite songs** to set and see your friends' favorite songs 🎧 + - Use **/favorite bae** to set and see your friends' baes 💝 + - Use **/favorite obsession** (previously "waifu") to set and see your friends' obsession picture 🖼️ + - These commands replace the prefixed commands, with improvements ♻️ + +- Added **/gender** commands to replace prefixed **Gender**! 🆔 + +- Added support for 'all', 'half', etc. in **/taypoints gift** 🪙 diff --git a/src/taylorbot-postgres/sqitch/deploy/0043_bump_version_1.19.0.sql b/src/taylorbot-postgres/sqitch/deploy/0043_bump_version_1.19.0.sql new file mode 100644 index 000000000..7b101eec3 --- /dev/null +++ b/src/taylorbot-postgres/sqitch/deploy/0043_bump_version_1.19.0.sql @@ -0,0 +1,15 @@ +-- Deploy taylorbot-postgres:0043_bump_version_1.19.0 to pg + +BEGIN; + +UPDATE commands.messages_of_the_day +SET message = 'TaylorBot keeps track of how active you are in each server. Use , and in you favorite server!' +WHERE message = 'TaylorBot keeps track of how active you are in each server. Use `{prefix}minutes` and `{prefix}rankminutes` to see time spent in a server!'; + +UPDATE commands.messages_of_the_day +SET message = 'TaylorBot remembers the date when you first joined a server. Use to see yours!' +WHERE message = 'TaylorBot remembers the date when you first joined a server. Use `{prefix}joined` to see yours!'; + +UPDATE configuration.application_info SET info_value = '1.19.0' WHERE info_key = 'product_version'; + +COMMIT; diff --git a/src/taylorbot-postgres/sqitch/revert/0043_bump_version_1.19.0.sql b/src/taylorbot-postgres/sqitch/revert/0043_bump_version_1.19.0.sql new file mode 100644 index 000000000..9a7d160e1 --- /dev/null +++ b/src/taylorbot-postgres/sqitch/revert/0043_bump_version_1.19.0.sql @@ -0,0 +1,15 @@ +-- Revert taylorbot-postgres:0043_bump_version_1.19.0 from pg + +BEGIN; + +UPDATE configuration.application_info SET info_value = '1.18.0' WHERE info_key = 'product_version'; + +UPDATE commands.messages_of_the_day +SET message = 'TaylorBot remembers the date when you first joined a server. Use `{prefix}joined` to see yours!' +WHERE message = 'TaylorBot remembers the date when you first joined a server. Use to see yours!'; + +UPDATE commands.messages_of_the_day +SET message = 'TaylorBot keeps track of how active you are in each server. Use `{prefix}minutes` and `{prefix}rankminutes` to see time spent in a server!' +WHERE message = 'TaylorBot keeps track of how active you are in each server. Use , and in you favorite server!'; + +COMMIT; diff --git a/src/taylorbot-postgres/sqitch/sqitch.plan b/src/taylorbot-postgres/sqitch/sqitch.plan index 4e2c75283..2f0b245f6 100644 --- a/src/taylorbot-postgres/sqitch/sqitch.plan +++ b/src/taylorbot-postgres/sqitch/sqitch.plan @@ -44,3 +44,4 @@ 0040_bump_version_1.17.0 2023-07-03T18:50:20Z Adam Gauthier # Bump product version to 1.17.0 0041_age_role 2023-07-21T02:45:00Z Adam Gauthier # Add age role configuration 0042_bump_version_1.18.0 2023-08-29T02:53:59Z Adam Gauthier # Bump product version to 1.18.0 +0043_bump_version_1.19.0 2023-12-06T03:15:57Z Adam Gauthier # Bump product version to 1.19.0 diff --git a/src/taylorbot-postgres/sqitch/verify/0043_bump_version_1.19.0.sql b/src/taylorbot-postgres/sqitch/verify/0043_bump_version_1.19.0.sql new file mode 100644 index 000000000..0434dcc0c --- /dev/null +++ b/src/taylorbot-postgres/sqitch/verify/0043_bump_version_1.19.0.sql @@ -0,0 +1,18 @@ +-- Verify taylorbot-postgres:0043_bump_version_1.19.0 on pg + +BEGIN; + +DO $$ +BEGIN + ASSERT (SELECT NOT EXISTS(SELECT FROM commands.messages_of_the_day WHERE + position('{prefix}minutes' in message) > 0 + )); + + ASSERT (SELECT NOT EXISTS(SELECT FROM commands.messages_of_the_day WHERE + position('{prefix}joined' in message) > 0 + )); + + ASSERT (SELECT info_value FROM configuration.application_info WHERE info_key = 'product_version') = '1.19.0'; +END $$; + +ROLLBACK; diff --git a/src/taylorbot-typescript/attributes/IntegerUserAttribute.ts b/src/taylorbot-typescript/attributes/IntegerUserAttribute.ts deleted file mode 100644 index 4451b99cd..000000000 --- a/src/taylorbot-typescript/attributes/IntegerUserAttribute.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { SettableUserAttribute } from './SettableUserAttribute'; -import { DatabaseDriver } from '../database/DatabaseDriver'; -import { User } from 'discord.js'; - -export abstract class IntegerUserAttribute extends SettableUserAttribute { - retrieve(database: DatabaseDriver, user: User): Promise { - return database.integerAttributes.get(this.id, user); - } - - set(database: DatabaseDriver, user: User, value: any): Promise> { - return database.integerAttributes.set(this.id, user, value.toString()); - } - - async clear(database: DatabaseDriver, user: User): Promise { - await database.integerAttributes.clear(this.id, user); - } - - formatValue(attribute: Record): string { - return attribute.integer_value.toString(); - } -}