diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7c16967..1d1abbf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,26 @@
Mostly based on [keepachangelog](https://keepachangelog.com/en/1.1.0/) except date format. a-c-f-r-o
+## [5.1.11] - 03.10.2024
+
+### Added
+
+- Added `%user.displayname%` placeholder. It will show users nickname, if there is one, otherwise it will show the username.
+ - Nickname won't be shown in bye messages.
+- Added initial version of grpc api. Beta
+
+### Fixed
+
+- Fixed a bug which caused `.bye` and `.greet` messages to be randomly disabled
+- Fixed `.lb -c` breaking sometimes, and fixed pagination
+
+### Changed
+
+- Youtube now always uses `yt-dlp`. Dropped support for `youtube-dl`
+ - If you've previously renamed your yt-dlp file to youtube-dl, please rename it back.
+- ytProvider in data/searches.yml now also controls where you're getting your song streams from.
+ - (Invidious support added for .q)
+
## [5.1.10] - 24.09.2024
### Fixed
diff --git a/src/EllieBot/EllieBot.csproj b/src/EllieBot/EllieBot.csproj
index 1ef7da7..6c88f77 100644
--- a/src/EllieBot/EllieBot.csproj
+++ b/src/EllieBot/EllieBot.csproj
@@ -4,7 +4,7 @@
enable
true
en
- 5.1.10
+ 5.1.11
$(MSBuildProjectDirectory)
diff --git a/src/EllieBot/Modules/Gambling/Gambling.cs b/src/EllieBot/Modules/Gambling/Gambling.cs
index 427274f..0348cf3 100644
--- a/src/EllieBot/Modules/Gambling/Gambling.cs
+++ b/src/EllieBot/Modules/Gambling/Gambling.cs
@@ -128,7 +128,7 @@ public partial class Gambling : GamblingModule
customId: "timely:remind_me"),
(smc) => RemindTimelyAction(smc, DateTime.UtcNow.Add(TimeSpan.FromHours(period)))
);
-
+
// Creates timely reminder button, parameter in milliseconds.
private EllieInteractionBase CreateRemindMeInteraction(double ms)
=> _inter
@@ -167,7 +167,7 @@ public partial class Gambling : GamblingModule
await Response().Pending(strs.timely_already_claimed(relativeTag)).Interaction(interaction).SendAsync();
return;
}
-
+
var patron = await _ps.GetPatronAsync(ctx.User.Id);
@@ -646,12 +646,11 @@ public partial class Gambling : GamblingModule
var cleanRichest = await uow.GetTable()
.Where(x => x.UserId.In(users))
.OrderByDescending(x => x.CurrencyAmount)
- .Skip(page * perPage)
+ .Skip(curPage * perPage)
.Take(perPage)
.ToListAsync();
- var sg = (SocketGuild)ctx.Guild!;
- return cleanRichest.Where(x => sg.GetUser(x.UserId) is not null).ToList();
+ return cleanRichest;
}
else
{
@@ -660,9 +659,6 @@ public partial class Gambling : GamblingModule
}
}
- var res = Response()
- .Paginated();
-
await Response()
.Paginated()
.PageItems(GetTopRichest)
diff --git a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs b/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs
index fb872aa..ffcedc5 100644
--- a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs
+++ b/src/EllieBot/Modules/Searches/_common/Config/SearchesConfig.cs
@@ -28,11 +28,9 @@ public partial class SearchesConfig : ICloneable
[Comment("""
Which search provider will be used for the `.youtube` and `.q` commands.
- - `ytDataApiv3` - uses google's official youtube data api. Requires `GoogleApiKey` set in creds and youtube data api enabled in developers console
+ - `ytDataApiv3` - uses google's official youtube data api. Requires `GoogleApiKey` set in creds and youtube data api enabled in developers console. `.q` is not supported for this setting. It will fallback to yt-dlp.
- - `ytdl` - default, uses youtube-dl. Requires `youtube-dl` to be installed and it's path added to env variables. Slow.
-
- - `ytdlp` - recommended easy, uses `yt-dlp`. Requires `yt-dlp` to be installed and it's path added to env variables
+ - `ytdlp` - default, recommended easy, uses `yt-dlp`. Requires `yt-dlp` to be installed and it's path added to env variables
- `invidious` - recommended advanced, uses invidious api. Requires at least one invidious instance specified in the `invidiousInstances` property
""")]
diff --git a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs b/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs
index 432d116..5ad305a 100644
--- a/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs
+++ b/src/EllieBot/Modules/Searches/_common/Config/SearchesConfigService.cs
@@ -47,19 +47,11 @@ public class SearchesConfigService : ConfigServiceBase
});
}
- if (data.Version < 2)
+ if (data.Version < 4)
{
ModifyConfig(c =>
{
- c.Version = 2;
- });
- }
-
- if (data.Version < 3)
- {
- ModifyConfig(c =>
- {
- c.Version = 3;
+ c.Version = 4;
});
}
}
diff --git a/src/EllieBot/_common/Replacements/Impl/ReplacementRegistrator.default.cs b/src/EllieBot/_common/Replacements/Impl/ReplacementRegistrator.default.cs
index de4d1be..445658a 100644
--- a/src/EllieBot/_common/Replacements/Impl/ReplacementRegistrator.default.cs
+++ b/src/EllieBot/_common/Replacements/Impl/ReplacementRegistrator.default.cs
@@ -65,6 +65,7 @@ public sealed partial class ReplacementPatternStore
Register("%user.mention%", static (IUser user) => user.Mention);
Register("%user.fullname%", static (IUser user) => user.ToString()!);
Register("%user.name%", static (IUser user) => user.Username);
+ Register("%user.displayname%", static (IUser user) => user is IGuildUser gu ? gu.DisplayName : user.Username);
Register("%user.discrim%", static (IUser user) => user.Discriminator);
Register("%user.avatar%", static (IUser user) => user.RealAvatarUrl().ToString());
Register("%user.id%", static (IUser user) => user.Id.ToString());
diff --git a/src/EllieBot/data/marmalades/marmalade.yml b/src/EllieBot/data/marmalades/marmalade.yml
index 4eb7a5c..5a807b1 100644
--- a/src/EllieBot/data/marmalades/marmalade.yml
+++ b/src/EllieBot/data/marmalades/marmalade.yml
@@ -1,5 +1,5 @@
# DO NOT CHANGE
version: 1
# List of marmalades automatically loaded at startup
-loaded:
+loaded:
- ngrpc
diff --git a/src/EllieBot/data/searches.yml b/src/EllieBot/data/searches.yml
index f551bae..8fb00d3 100644
--- a/src/EllieBot/data/searches.yml
+++ b/src/EllieBot/data/searches.yml
@@ -1,5 +1,5 @@
# DO NOT CHANGE
-version: 3
+version: 4
# Which engine should .search command
# 'google_scrape' - default. Scrapes the webpage for results. May break. Requires no api keys.
# 'google' - official google api. Requires googleApiKey and google.searchId set in creds.yml
@@ -11,14 +11,12 @@ webSearchEngine: Google_Scrape
imgSearchEngine: Google
# Which search provider will be used for the `.youtube` and `.q` commands.
#
-# - `ytDataApiv3` - uses google's official youtube data api. Requires `GoogleApiKey` set in creds and youtube data api enabled in developers console
+# - `ytDataApiv3` - uses google's official youtube data api. Requires `GoogleApiKey` set in creds and youtube data api enabled in developers console. `.q` is not supported for this setting. It will fallback to yt-dlp.
#
-# - `ytdl` - default, uses youtube-dl. Requires `youtube-dl` to be installed and it's path added to env variables. Slow.
-#
-# - `ytdlp` - recommended easy, uses `yt-dlp`. Requires `yt-dlp` to be installed and it's path added to env variables
+# - `ytdlp` - default, recommended easy, uses `yt-dlp`. Requires `yt-dlp` to be installed and it's path added to env variables
#
# - `invidious` - recommended advanced, uses invidious api. Requires at least one invidious instance specified in the `invidiousInstances` property
-ytProvider: Ytdlp
+ytProvider: Ytdl
# Set the searx instance urls in case you want to use 'searx' for either img or web search.
# Ellie will use a random one for each request.
# Use a fully qualified url. Example: `https://my-searx-instance.mydomain.com`