Skip to content

Commit

Permalink
bump version to 1.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgauthier committed Jun 12, 2024
1 parent 0efb745 commit 3d1f6fb
Show file tree
Hide file tree
Showing 10 changed files with 183 additions and 10 deletions.
28 changes: 28 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@
"-DatabaseBackupFile ${input:backupFile}",
]
},
{
"name": "Add-SqitchChange",
"type": "PowerShell",
"request": "launch",
"script": "${workspaceFolder}/src/taylorbot-postgres/Add-SqitchChange.ps1",
"args": [
"-ChangeName ${input:sqitchChangeName}",
"-Note '${input:sqitchNote}'",
]
},
{
"name": "Deploy-Sqitch (Local)",
"type": "PowerShell",
"request": "launch",
"script": "${workspaceFolder}/src/taylorbot-postgres/Deploy-Sqitch.ps1",
},
{
"name": "Deploy-Redis (Local)",
"type": "PowerShell",
Expand Down Expand Up @@ -158,5 +174,17 @@
"description": "Discord Bot Token",
"default": ""
},
{
"id": "sqitchChangeName",
"type": "promptString",
"description": "Sqitch change name",
"default": "bump_version_1.21.0"
},
{
"id": "sqitchNote",
"type": "promptString",
"description": "Sqitch note",
"default": "Bump product version to 1.21.0"
},
]
}
28 changes: 28 additions & 0 deletions docs/release-notes/1.21.0_changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# TaylorBot v1.21.0 Release Notes 📝

- Use TaylorBot everywhere on Discord 🎉
- You can add **TaylorBot** to your account, allowing you to use even in servers where **TaylorBot** is not added 🌐
- On **TaylorBot's profile**, tap **Add App** -> **Use this app everywhere**
- You can now go to **DMs** with your friends and type **/** to use **TaylorBot** commands ✨
- Some commands like **/server**, **/channel**, and **/mod** are not available unless **TaylorBot** is added to the **server** ⚠️

- Added **/usernames show** command to see the username history of a user! 🔍
- Use **/usernames visibility** to configure the visibility of your own history through this command 🕵️
- These commands replace the prefixed **Usernames** command, with improvements ♻️

- Added **/plus show** command to see your **TaylorBot Plus** status! 💎
- **TaylorBot Plus** is a [Patreon](https://www.patreon.com/taylorbot) subscription giving you and your favorite servers exclusive access to features ⚡
- You also get some extra taypoints every month as a thank you for supporting TaylorBot and keeping it free for everyone 💖
- Use **/plus add** and **/plus remove** to add/remove the current server to/from your plus servers, giving it access to exclusive perks 💪
- These commands replace the prefixed **Plus** commands, with improvements ♻️

- Leaderboards commands are better than ever! 🏆
- **Fixed** issues with **slowness and errors in large servers** due to scaling ↗️
- Leaderboards now show up to **150 entries** in 10 pages 📖
- **/taypoints balance** shows you the **leaderboard rank of the user** in the current server if they are top 500 🥇

- Increased birthday rewards from **1,000** taypoints to **5,000** taypoints, use **/birthday set** to set yours 🎁

- Monitored edited messages from **/monitor edited** now include a jump link to the message! 🔗

- Significantly improved **stability, reliability and latency** of all commands through many behind the scenes changes 🚀
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public class DailyClaimCommand(IOptionsMonitor<DailyPayoutOptions> options, IDai
.WithColor(TaylorBotColors.SuccessColor)
.WithDescription(
$"""
You redeemed {"taypoint".ToQuantity(payoutAmount, format)} + {"bonus point".ToQuantity(redeemResult.BonusAmount, format)}. You now have {redeemResult.TotalTaypointCount.ToString(format)}. 💰
Bonus streak: {redeemResult.CurrentDailyStreak.ToString(format)}/{nextStreakForBonus.ToString(format)}. Don't miss a day and get a bonus! See you tomorrow! 😄
**Daily Message:** {messageOfTheDay.Replace("{prefix}", commandPrefix)}
You redeemed {"taypoint".ToQuantity(payoutAmount, format)} + {"bonus point".ToQuantity(redeemResult.BonusAmount, format)}. You now have {redeemResult.TotalTaypointCount.ToString(format)} 💰
Streak: {redeemResult.CurrentDailyStreak.ToString(format)}/{nextStreakForBonus.ToString(format)}. Don't miss a day and get a bonus! See you tomorrow! 😄
### Daily Message 📨
{messageOfTheDay.Replace("{prefix}", commandPrefix)}
""")
.Build());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ public ValueTask<Command> GetCommandAsync(RunContext context, NoOptions options)
$"""
You are currently a **TaylorBot Plus** member 💎
Thank you for supporting {"TaylorBot on Patreon".DiscordMdLink("https://www.patreon.com/taylorbot")}! 💖
If you have any questions, join the TaylorBot server listed on the Patreon 😊
If you have any questions, join the {"TaylorBot support server".DiscordMdLink("https://discord.gg/3qVNd5P")} 😊
""")
.AddField(
"Plus Servers",
plusUser.ActivePlusGuilds.Count > 0 ?
$"""
These servers benefit from **TaylorBot Plus** features thanks to you!
{string.Join('\n', plusUser.ActivePlusGuilds.Select(name => $"- {name}"))}
Use {context.MentionCommand("plus add")} to add plus servers (up to **{plusUser.MaxPlusGuilds}**) 😳
""".Truncate(EmbedFieldBuilder.MaxFieldValueLength) :
$"You don't have any plus server set, add one with {context.MentionCommand("plus add")} (up to **{plusUser.MaxPlusGuilds}**)!"
Expand All @@ -67,7 +67,7 @@ These servers benefit from **TaylorBot Plus** features thanks to you!
.WithThumbnailUrl("https://i.imgur.com/55CptF4.jpg")
.WithDescription(
$"""
You are currently not part of **TaylorBot Plus** 🚫
You are currently not part of **TaylorBot Plus** 😢
TaylorBot is free for everyone thanks to the community members that {"support on Patreon".DiscordMdLink("https://www.patreon.com/taylorbot")} 💖
If you support on Patreon, you'll also get access to exclusive features and points 😱
""");
Expand Down
38 changes: 38 additions & 0 deletions src/taylorbot-postgres/Add-SqitchChange.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
param (
[Parameter(Mandatory = $true)]
[string]$ChangeName,

[Parameter(Mandatory = $true)]
[string]$Note,

[Parameter(Mandatory = $false)]
[string]$Email,

[Parameter(Mandatory = $false)]
[string]$FullName
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"

[System.ArgumentException]::ThrowIfNullOrWhiteSpace($ChangeName, "ChangeName")
[System.ArgumentException]::ThrowIfNullOrWhiteSpace($Note, "Note")

if ([string]::IsNullOrWhiteSpace($Email)) {
Write-Output "Getting email from git config"
$Email = git config user.email
}
[System.ArgumentException]::ThrowIfNullOrWhiteSpace($Email, "Email")

if ([string]::IsNullOrWhiteSpace($FullName)) {
Write-Output "Getting full name from git config"
$FullName = git config user.name
}
[System.ArgumentException]::ThrowIfNullOrWhiteSpace($FullName, "FullName")

Set-Location "$PSScriptRoot/sqitch"

$Date = Get-Date -Format "yyyyMMdd"
$FullChangeName = "${Date}_${ChangeName}"

C:\WINDOWS\system32\wsl.exe --distribution Ubuntu-20.04 -- `
bash -c "export SQITCH_FULLNAME='$FullName' && export SQITCH_EMAIL='$Email' && ./sqitch.sh add --change-name '$FullChangeName' --note '$Note'"
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-- Deploy taylorbot-postgres:20240611_bump_version_1.21.0 to pg

BEGIN;

UPDATE configuration.application_info SET info_value = '1.21.0' WHERE info_key = 'product_version';

UPDATE commands.messages_of_the_day
SET message = 'Subscribe to [TaylorBot Plus](https://www.patreon.com/taylorbot) to get **exclusive features and taypoints**, learn more with </plus show:1246970937321066608> 💎'
WHERE message = 'TaylorBot is funded by the community, thanks to our TaylorBot Plus members. Learn more with `{prefix}plus`.';

UPDATE commands.messages_of_the_day
SET message = 'On **TaylorBot''s profile**, tap **Add App** -> **Add to Server** to add TaylorBot to your own server! 🤖'
WHERE message = 'Do you like TaylorBot? Do you want to add me to another server you''re in? Use the ''**Add to Server**'' button on my profile to get started!';

INSERT INTO commands.messages_of_the_day (message, priority_from, priority_to) VALUES (
'TaylorBot **1.21.0** is out! You can **use the bot everywhere on Discord** 🎉
- Add **TaylorBot** to your account, allowing you to use even in servers where **TaylorBot** is not added 🌐
- On **TaylorBot''s profile**, tap **Add App** -> **Use this app everywhere** ✅
- You can also go to **DMs** with your friends and type **/** to use **TaylorBot** commands ✨'
, timestamp with time zone '2024-06-12', timestamp with time zone '2024-06-14');


COMMIT;
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-- Revert taylorbot-postgres:20240611_bump_version_1.21.0 from pg

BEGIN;

DELETE FROM commands.messages_of_the_day
WHERE message =
'TaylorBot **1.21.0** is out! You can **use the bot everywhere on Discord** 🎉
- Add **TaylorBot** to your account, allowing you to use even in servers where **TaylorBot** is not added 🌐
- On **TaylorBot''s profile**, tap **Add App** -> **Use this app everywhere** ✅
- You can also go to **DMs** with your friends and type **/** to use **TaylorBot** commands ✨';

UPDATE commands.messages_of_the_day
SET message = 'Do you like TaylorBot? Do you want to add me to another server you''re in? Use the ''**Add to Server**'' button on my profile to get started!'
WHERE message = 'On **TaylorBot''s profile**, tap **Add App** -> **Add to Server** to add TaylorBot to your own server! 🤖';

UPDATE commands.messages_of_the_day
SET message = 'TaylorBot is funded by the community, thanks to our TaylorBot Plus members. Learn more with `{prefix}plus`.'
WHERE message = 'Subscribe to [TaylorBot Plus](https://www.patreon.com/taylorbot) to get **exclusive features and taypoints**, learn more with </plus show:1246970937321066608> 💎';

UPDATE configuration.application_info SET info_value = '1.20.0' WHERE info_key = 'product_version';

COMMIT;
1 change: 1 addition & 0 deletions src/taylorbot-postgres/sqitch/sqitch.plan
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@
20240213_bump_version_1.20.0 2024-02-14T07:25:08Z Adam Gauthier <adamgauthier12@gmail.com> # Bump product version to 1.20.0
20240220_leaderboard_perf 2024-02-21T07:19:05Z Adam Gauthier <adamgauthier12@gmail.com> # Fix leaderboard performance issues
20240426_duplicate_commands 2024-04-27T04:29:34Z Adam Gauthier <adamgauthier12@gmail.com> # Remove recently deprecated commands
20240611_bump_version_1.21.0 2024-06-12T02:20:13Z Adam Gauthier <adamgauthier12@gmail.com> # Bump product version to 1.21.0
14 changes: 11 additions & 3 deletions src/taylorbot-postgres/sqitch/sqitch.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# Source: https://github.com/sqitchers/docker-sqitch/blob/main/docker-sqitch.sh

# Determine which Docker image to run.
SQITCH_IMAGE=${SQITCH_IMAGE:=sqitch/sqitch:latest}
Expand All @@ -19,7 +20,7 @@ case "$(uname -s)" in
passopt+=(-u $(id -u ${user}):$(id -g ${user}))
;;
Darwin*)
passopt+=(-e "SQITCH_ORIG_FULLNAME=$(id -P $user | awk -F '[:]' '{print $8}')")
passopt+=(-e "SQITCH_ORIG_FULLNAME=$(/usr/bin/id -P $user | awk -F '[:]' '{print $8}')")
;;
MINGW*|CYGWIN*)
passopt+=(-e "SQITCH_ORIG_FULLNAME=$(net user $user)")
Expand All @@ -39,7 +40,7 @@ for var in \
TNS_ADMIN TWO_TASK ORACLE_SID \
ISC_USER ISC_PASSWORD \
VSQL_HOST VSQL_PORT VSQL_USER VSQL_PASSWORD VSQL_SSLMODE \
SNOWSQL_ACCOUNT SNOWSQL_USER SNOWSQL_PWD SNOWSQL_HOST SNOWSQL_PORT SNOWSQL_DATABASE SNOWSQL_REGION SNOWSQL_WAREHOUSE SNOWSQL_PRIVATE_KEY_PASSPHRASE
SNOWSQL_ACCOUNT SNOWSQL_USER SNOWSQL_PWD SNOWSQL_HOST SNOWSQL_PORT SNOWSQL_DATABASE SNOWSQL_REGION SNOWSQL_WAREHOUSE SNOWSQL_PRIVATE_KEY_PASSPHRASE SNOWSQL_ROLE
do
if [ -n "${!var}" ]; then
passopt+=(-e $var)
Expand All @@ -54,8 +55,15 @@ fi
# Set HOME, since the user ID likely won't be the same as for the sqitch user.
passopt+=(-e "HOME=${homedst}")

# Determine necessary flags when stdin and/or stdout are opened on a TTY.
if [ -t 0 ] && [ -t 1 ]; then
passopt+=(--interactive --tty)
elif [ ! -t 0 ]; then
passopt+=(--interactive)
fi

# Run the container with the current and home directories mounted.
docker run -it --rm --network host \
docker run --rm --network host \
--mount "type=bind,src=$(pwd),dst=/repo" \
--mount "type=bind,src=$HOME,dst=$homedst" \
"${passopt[@]}" "$SQITCH_IMAGE" "$@"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-- Verify taylorbot-postgres:20240611_bump_version_1.21.0 on pg

BEGIN;

DO $$
BEGIN
ASSERT (SELECT info_value FROM configuration.application_info WHERE info_key = 'product_version') = '1.21.0';

ASSERT (SELECT NOT EXISTS(SELECT FROM commands.messages_of_the_day WHERE
position('{prefix}plus' in message) > 0
));

ASSERT (SELECT EXISTS(SELECT FROM commands.messages_of_the_day WHERE
message = 'On **TaylorBot''s profile**, tap **Add App** -> **Add to Server** to add TaylorBot to your own server! 🤖'
));

ASSERT (SELECT EXISTS(SELECT FROM commands.messages_of_the_day WHERE message =
'TaylorBot **1.21.0** is out! You can **use the bot everywhere on Discord** 🎉
- Add **TaylorBot** to your account, allowing you to use even in servers where **TaylorBot** is not added 🌐
- On **TaylorBot''s profile**, tap **Add App** -> **Use this app everywhere** ✅
- You can also go to **DMs** with your friends and type **/** to use **TaylorBot** commands ✨'
));
END $$;

ROLLBACK;

0 comments on commit 3d1f6fb

Please sign in to comment.