mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b4fec10ee6 | ||
|
42b9a01550 | ||
|
5f94b20015 | ||
|
201aa45c6b | ||
|
97ae7b5a5b | ||
|
9b09f223d9 | ||
|
2caf406254 | ||
|
ce5e04b398 | ||
|
775487ad47 | ||
|
41e4936f52 | ||
|
d831a116d9 | ||
|
8f43b44677 |
@@ -14,8 +14,16 @@ variables:
|
|||||||
tests: "NadekoBot.Tests"
|
tests: "NadekoBot.Tests"
|
||||||
LINUX_X64_OUTPUT_DIR: "nadekobot-linux-x64"
|
LINUX_X64_OUTPUT_DIR: "nadekobot-linux-x64"
|
||||||
LINUX_X64_RELEASE: "$CI_COMMIT_TAG-linux-x64-build.tar"
|
LINUX_X64_RELEASE: "$CI_COMMIT_TAG-linux-x64-build.tar"
|
||||||
|
LINUX_ARM64_OUTPUT_DIR: "nadekobot-linux-arm64"
|
||||||
|
LINUX_ARM64_RELEASE: "$CI_COMMIT_TAG-linux-arm64-build.tar"
|
||||||
|
MACOS_X64_OUTPUT_DIR: "nadekobot-osx-x64"
|
||||||
|
MACOS_X64_RELEASE: "$CI_COMMIT_TAG-osx-x64-build.tar"
|
||||||
|
MACOS_ARM64_OUTPUT_DIR: "nadekobot-osx-arm64"
|
||||||
|
MACOS_ARM64_RELEASE: "$CI_COMMIT_TAG-osx-arm64-build.tar"
|
||||||
WIN_X64_OUTPUT_DIR: "nadekobot-windows-x64"
|
WIN_X64_OUTPUT_DIR: "nadekobot-windows-x64"
|
||||||
WIN_X64_RELEASE: "$CI_COMMIT_TAG-windows-x64-build.zip"
|
WIN_X64_RELEASE: "$CI_COMMIT_TAG-windows-x64-build.zip"
|
||||||
|
WIN_ARM64_OUTPUT_DIR: "nadekobot-windows-arm64"
|
||||||
|
WIN_ARM64_RELEASE: "$CI_COMMIT_TAG-windows-arm64-build.zip"
|
||||||
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/NadekoBot-build/${CI_COMMIT_TAG}"
|
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/NadekoBot-build/${CI_COMMIT_TAG}"
|
||||||
INSTALLER_OUTPUT_DIR: "nadeko-installers/${CI_COMMIT_TAG}"
|
INSTALLER_OUTPUT_DIR: "nadeko-installers/${CI_COMMIT_TAG}"
|
||||||
INSTALLER_FILE_NAME: "nadeko-setup-${CI_COMMIT_TAG}.exe"
|
INSTALLER_FILE_NAME: "nadeko-setup-${CI_COMMIT_TAG}.exe"
|
||||||
@@ -24,11 +32,19 @@ build:
|
|||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- "dotnet publish -c Release -r linux-x64 --self-contained -o $LINUX_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
- "dotnet publish -c Release -r linux-x64 --self-contained -o $LINUX_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||||
|
- "dotnet publish -c Release -r linux-arm64 --self-contained -o $LINUX_ARM64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||||
- "dotnet publish -c Release -r win7-x64 --self-contained -o $WIN_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
- "dotnet publish -c Release -r win7-x64 --self-contained -o $WIN_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||||
|
- "dotnet publish -c Release -r win7-arm64 --self-contained -o $WIN_ARM64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||||
|
- "dotnet publish -c Release -r osx-x64 --self-contained -o $MACOS_X64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||||
|
- "dotnet publish -c Release -r osx-arm64 --self-contained -o $MACOS_ARM64_OUTPUT_DIR src/NadekoBot/NadekoBot.csproj"
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- "$LINUX_X64_OUTPUT_DIR/"
|
- "$LINUX_X64_OUTPUT_DIR/"
|
||||||
|
- "$LINUX_ARM64_OUTPUT_DIR/"
|
||||||
- "$WIN_X64_OUTPUT_DIR/"
|
- "$WIN_X64_OUTPUT_DIR/"
|
||||||
|
- "$WIN_ARM64_OUTPUT_DIR/"
|
||||||
|
- "$MACOS_X64_OUTPUT_DIR/"
|
||||||
|
- "$MACOS_ARM64_OUTPUT_DIR/"
|
||||||
|
|
||||||
upload-builds:
|
upload-builds:
|
||||||
stage: upload-builds
|
stage: upload-builds
|
||||||
@@ -38,12 +54,23 @@ upload-builds:
|
|||||||
script:
|
script:
|
||||||
- apk add --no-cache curl tar zip
|
- apk add --no-cache curl tar zip
|
||||||
- "tar cvf $LINUX_X64_RELEASE $LINUX_X64_OUTPUT_DIR/*"
|
- "tar cvf $LINUX_X64_RELEASE $LINUX_X64_OUTPUT_DIR/*"
|
||||||
|
- "tar cvf $LINUX_ARM64_RELEASE $LINUX_ARM64_OUTPUT_DIR/*"
|
||||||
|
- "tar cvf $MACOS_X64_RELEASE $MACOS_X64_OUTPUT_DIR/*"
|
||||||
|
- "tar cvf $MACOS_ARM64_RELEASE $MACOS_ARM64_OUTPUT_DIR/*"
|
||||||
- "zip -r $WIN_X64_RELEASE $WIN_X64_OUTPUT_DIR/*"
|
- "zip -r $WIN_X64_RELEASE $WIN_X64_OUTPUT_DIR/*"
|
||||||
|
- "zip -r $WIN_ARM64_RELEASE $WIN_ARM64_OUTPUT_DIR/*"
|
||||||
- |
|
- |
|
||||||
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $LINUX_X64_RELEASE $PACKAGE_REGISTRY_URL/$LINUX_X64_RELEASE
|
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $LINUX_X64_RELEASE $PACKAGE_REGISTRY_URL/$LINUX_X64_RELEASE
|
||||||
|
- |
|
||||||
|
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $LINUX_ARM64_RELEASE $PACKAGE_REGISTRY_URL/$LINUX_ARM64_RELEASE
|
||||||
- |
|
- |
|
||||||
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $WIN_X64_RELEASE $PACKAGE_REGISTRY_URL/$WIN_X64_RELEASE
|
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $WIN_X64_RELEASE $PACKAGE_REGISTRY_URL/$WIN_X64_RELEASE
|
||||||
|
- |
|
||||||
|
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $WIN_ARM64_RELEASE $PACKAGE_REGISTRY_URL/$WIN_ARM64_RELEASE
|
||||||
|
- |
|
||||||
|
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $MACOS_X64_RELEASE $PACKAGE_REGISTRY_URL/$MACOS_X64_RELEASE
|
||||||
|
- |
|
||||||
|
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $MACOS_ARM64_RELEASE $PACKAGE_REGISTRY_URL/$MACOS_ARM64_RELEASE
|
||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
||||||
@@ -53,7 +80,11 @@ release:
|
|||||||
- |
|
- |
|
||||||
release-cli create --name "NadekoBot v$CI_COMMIT_TAG" --description "## [Changelog](https://gitlab.com/Kwoth/nadekobot/-/blob/v4/CHANGELOG.md#$(echo "$CI_COMMIT_TAG" | sed "s/\.//g")-$(date +%d%m%Y))" --tag-name $CI_COMMIT_TAG \
|
release-cli create --name "NadekoBot v$CI_COMMIT_TAG" --description "## [Changelog](https://gitlab.com/Kwoth/nadekobot/-/blob/v4/CHANGELOG.md#$(echo "$CI_COMMIT_TAG" | sed "s/\.//g")-$(date +%d%m%Y))" --tag-name $CI_COMMIT_TAG \
|
||||||
--assets-link "{\"name\":\"${LINUX_X64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_X64_RELEASE}\"}" \
|
--assets-link "{\"name\":\"${LINUX_X64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_X64_RELEASE}\"}" \
|
||||||
--assets-link "{\"name\":\"${WIN_X64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${WIN_X64_RELEASE}\"}"
|
--assets-link "{\"name\":\"${LINUX_ARM64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_ARM64_RELEASE}\"}" \
|
||||||
|
--assets-link "{\"name\":\"${WIN_X64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${WIN_X64_RELEASE}\"}" \
|
||||||
|
--assets-link "{\"name\":\"${WIN_ARM64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${WIN_ARM64_RELEASE}\"}" \
|
||||||
|
--assets-link "{\"name\":\"${MACOS_X64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${MACOS_X64_RELEASE}\"}" \
|
||||||
|
--assets-link "{\"name\":\"${MACOS_ARM64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${MACOS_ARM64_RELEASE}\"}"
|
||||||
|
|
||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
|
15
CHANGELOG.md
15
CHANGELOG.md
@@ -2,6 +2,21 @@
|
|||||||
|
|
||||||
Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o
|
Experimental changelog. Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except date format. a-c-f-r-o
|
||||||
|
|
||||||
|
## [4.3.17] - 06.09.2023
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix to waifu gifts being character limited
|
||||||
|
- Fixes UserUpdated and UserPresence not correctly ignoring users that are logignored
|
||||||
|
- Added Trim() to activity names since apparently some activities have trailing spaces.
|
||||||
|
|
||||||
|
## [4.3.16] - 24.05.2023
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed missing events from `.logevents`
|
||||||
|
- Fixed `.log` thread deleted and thread created events not working properly
|
||||||
|
|
||||||
## [4.3.15] - 21.05.2023
|
## [4.3.15] - 21.05.2023
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@@ -28,12 +28,11 @@ WORKDIR /app
|
|||||||
RUN set -xe; \
|
RUN set -xe; \
|
||||||
useradd -m nadeko; \
|
useradd -m nadeko; \
|
||||||
apt-get update; \
|
apt-get update; \
|
||||||
apt-get install -y --no-install-recommends libopus0 libsodium23 libsqlite3-0 curl ffmpeg python3 python3-pip sudo; \
|
apt-get install -y --no-install-recommends libopus0 libsodium23 libsqlite3-0 curl ffmpeg python3 sudo; \
|
||||||
update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1; \
|
update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1; \
|
||||||
echo 'Defaults>nadeko env_keep+="ASPNETCORE_* DOTNET_* NadekoBot_* shard_id total_shards TZ"' > /etc/sudoers.d/nadeko; \
|
echo 'Defaults>nadeko env_keep+="ASPNETCORE_* DOTNET_* NadekoBot_* shard_id total_shards TZ"' > /etc/sudoers.d/nadeko; \
|
||||||
pip3 install --no-cache-dir --upgrade youtube-dl; \
|
curl -Lo /usr/local/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp; \
|
||||||
apt-get purge -y python3-pip; \
|
chmod a+rx /usr/local/bin/yt-dlp; \
|
||||||
chmod +x /usr/local/bin/youtube-dl; \
|
|
||||||
apt-get autoremove -y; \
|
apt-get autoremove -y; \
|
||||||
apt-get autoclean -y
|
apt-get autoclean -y
|
||||||
|
|
||||||
|
23
docker-compose.yml
Normal file
23
docker-compose.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
nadeko:
|
||||||
|
image: insert-image-name-here:latest
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
environment:
|
||||||
|
TZ: Europe/Paris
|
||||||
|
NadekoBot_RedisOptions: redis,name=nadeko
|
||||||
|
#NadekoBot_ShardRunCommand: dotnet
|
||||||
|
#NadekoBot_ShardRunArguments: /app/NadekoBot.dll {0} {1}
|
||||||
|
volumes:
|
||||||
|
- /srv/nadeko/conf:/app/conf:ro
|
||||||
|
- /srv/nadeko/data:/app/data
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:4-alpine
|
||||||
|
sysctls:
|
||||||
|
- net.core.somaxconn=511
|
||||||
|
command: redis-server --maxmemory 32M --maxmemory-policy volatile-lru
|
||||||
|
volumes:
|
||||||
|
- /srv/nadeko/redis-data:/data
|
@@ -68,12 +68,7 @@ Some features have their own specific placeholders which are noted in that featu
|
|||||||
- `%ban.reason%` - Reason for the ban, if provided
|
- `%ban.reason%` - Reason for the ban, if provided
|
||||||
- `%ban.duration%` - Duration of the ban in the form Days.Hours:Minutes (6.05:04)
|
- `%ban.duration%` - Duration of the ban in the form Days.Hours:Minutes (6.05:04)
|
||||||
|
|
||||||
### Bot stats placeholders
|
### Shard stats placeholders
|
||||||
|
|
||||||
- `%servers%` - Server count bot has joined
|
|
||||||
- `%users%` - Combined user count on servers the bot has joined
|
|
||||||
|
|
||||||
### Shard stats placeholders
|
|
||||||
|
|
||||||
- `%shard.servercount%` - Server count on current shard
|
- `%shard.servercount%` - Server count on current shard
|
||||||
- `%shard.usercount%` - Combined user count on current shard
|
- `%shard.usercount%` - Combined user count on current shard
|
||||||
|
@@ -98,7 +98,8 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor
|
|||||||
|
|
||||||
if (!GuildLogSettings.TryGetValue(gu.Guild.Id, out var logSetting)
|
if (!GuildLogSettings.TryGetValue(gu.Guild.Id, out var logSetting)
|
||||||
|| before is null
|
|| before is null
|
||||||
|| after is null)
|
|| after is null
|
||||||
|
|| logSetting.LogIgnores.Any(ilc => ilc.LogItemId == gu.Id && ilc.ItemType == IgnoredItemType.User))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ITextChannel? logChannel;
|
ITextChannel? logChannel;
|
||||||
@@ -150,9 +151,11 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (sch.HasValue || sch.Value is not IGuildChannel ch)
|
if (!sch.HasValue)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
var ch = sch.Value;
|
||||||
|
|
||||||
if (!GuildLogSettings.TryGetValue(ch.Guild.Id, out var logSetting)
|
if (!GuildLogSettings.TryGetValue(ch.Guild.Id, out var logSetting)
|
||||||
|| logSetting.ThreadDeletedId is null)
|
|| logSetting.ThreadDeletedId is null)
|
||||||
return;
|
return;
|
||||||
@@ -165,7 +168,7 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor
|
|||||||
|
|
||||||
await logChannel.EmbedAsync(_eb.Create()
|
await logChannel.EmbedAsync(_eb.Create()
|
||||||
.WithOkColor()
|
.WithOkColor()
|
||||||
.WithTitle("🆕 " + title)
|
.WithTitle("🗑 " + title)
|
||||||
.WithDescription($"{ch.Name} | {ch.Id}")
|
.WithDescription($"{ch.Name} | {ch.Id}")
|
||||||
.WithFooter(CurrentTime(ch.Guild)));
|
.WithFooter(CurrentTime(ch.Guild)));
|
||||||
}
|
}
|
||||||
@@ -177,15 +180,12 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor
|
|||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Task _client_ThreadCreated(SocketThreadChannel sch)
|
private Task _client_ThreadCreated(SocketThreadChannel ch)
|
||||||
{
|
{
|
||||||
_ = Task.Run(async () =>
|
_ = Task.Run(async () =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (sch.Guild is not IGuildChannel ch)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!GuildLogSettings.TryGetValue(ch.Guild.Id, out var logSetting)
|
if (!GuildLogSettings.TryGetValue(ch.Guild.Id, out var logSetting)
|
||||||
|| logSetting.ThreadCreatedId is null)
|
|| logSetting.ThreadCreatedId is null)
|
||||||
return;
|
return;
|
||||||
@@ -351,7 +351,7 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor
|
|||||||
|
|
||||||
var g = after.Guild;
|
var g = after.Guild;
|
||||||
|
|
||||||
if (!GuildLogSettings.TryGetValue(g.Id, out var logSetting) || logSetting.UserUpdatedId is null)
|
if (!GuildLogSettings.TryGetValue(g.Id, out var logSetting) || logSetting.UserUpdatedId is null || logSetting.LogIgnores.Any(ilc => ilc.LogItemId == after.Id && ilc.ItemType == IgnoredItemType.User))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ITextChannel? logChannel;
|
ITextChannel? logChannel;
|
||||||
@@ -456,6 +456,12 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor
|
|||||||
case LogType.UserWarned:
|
case LogType.UserWarned:
|
||||||
channelId = logSetting.LogWarnsId = logSetting.LogWarnsId is null ? cid : default;
|
channelId = logSetting.LogWarnsId = logSetting.LogWarnsId is null ? cid : default;
|
||||||
break;
|
break;
|
||||||
|
case LogType.ThreadDeleted:
|
||||||
|
channelId = logSetting.ThreadDeletedId = logSetting.ThreadDeletedId is null ? cid : default;
|
||||||
|
break;
|
||||||
|
case LogType.ThreadCreated:
|
||||||
|
channelId = logSetting.ThreadCreatedId = logSetting.ThreadCreatedId is null ? cid : default;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
uow.SaveChanges();
|
uow.SaveChanges();
|
||||||
@@ -1267,6 +1273,12 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor
|
|||||||
case LogType.UserWarned:
|
case LogType.UserWarned:
|
||||||
id = logSetting.LogWarnsId;
|
id = logSetting.LogWarnsId;
|
||||||
break;
|
break;
|
||||||
|
case LogType.ThreadCreated:
|
||||||
|
id = logSetting.ThreadCreatedId;
|
||||||
|
break;
|
||||||
|
case LogType.ThreadDeleted:
|
||||||
|
id = logSetting.ThreadDeletedId;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id is null or 0)
|
if (id is null or 0)
|
||||||
@@ -1345,4 +1357,4 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor
|
|||||||
GuildLogSettings.AddOrUpdate(guildId, newLogSetting, (_, _) => newLogSetting);
|
GuildLogSettings.AddOrUpdate(guildId, newLogSetting, (_, _) => newLogSetting);
|
||||||
uow.SaveChanges();
|
uow.SaveChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -143,6 +143,12 @@ public partial class Administration
|
|||||||
return l.LogVoicePresenceTTSId;
|
return l.LogVoicePresenceTTSId;
|
||||||
case LogType.UserMuted:
|
case LogType.UserMuted:
|
||||||
return l.UserMutedId;
|
return l.UserMutedId;
|
||||||
|
case LogType.UserWarned:
|
||||||
|
return l.LogWarnsId;
|
||||||
|
case LogType.ThreadDeleted:
|
||||||
|
return l.ThreadDeletedId;
|
||||||
|
case LogType.ThreadCreated:
|
||||||
|
return l.ThreadCreatedId;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@@ -250,8 +250,9 @@ public partial class Gambling
|
|||||||
? "-"
|
? "-"
|
||||||
: string.Join("\n",
|
: string.Join("\n",
|
||||||
itemList.Where(x => waifuItems.TryGetValue(x.ItemEmoji, out _))
|
itemList.Where(x => waifuItems.TryGetValue(x.ItemEmoji, out _))
|
||||||
.OrderBy(x => waifuItems[x.ItemEmoji].Price)
|
.OrderByDescending(x => waifuItems[x.ItemEmoji].Price)
|
||||||
.GroupBy(x => x.ItemEmoji)
|
.GroupBy(x => x.ItemEmoji)
|
||||||
|
.Take(60)
|
||||||
.Select(x => $"{x.Key} x{x.Count(),-3}")
|
.Select(x => $"{x.Key} x{x.Count(),-3}")
|
||||||
.Chunk(2)
|
.Chunk(2)
|
||||||
.Select(x => string.Join(" ", x)));
|
.Select(x => string.Join(" ", x)));
|
||||||
@@ -264,7 +265,10 @@ public partial class Gambling
|
|||||||
|
|
||||||
var fansList = await _service.GetFansNames(wi.WaifuId);
|
var fansList = await _service.GetFansNames(wi.WaifuId);
|
||||||
var fansStr = fansList
|
var fansStr = fansList
|
||||||
.Select((x) => claimsNames.Contains(x) ? $"{x} 💞" : x).Join('\n');
|
.Shuffle()
|
||||||
|
.Take(30)
|
||||||
|
.Select((x) => claimsNames.Contains(x) ? $"{x} 💞" : x)
|
||||||
|
.Join('\n');
|
||||||
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(fansStr))
|
if (string.IsNullOrWhiteSpace(fansStr))
|
||||||
@@ -350,4 +354,4 @@ public partial class Gambling
|
|||||||
await ReplyErrorLocalizedAsync(strs.not_enough(CurrencySign));
|
await ReplyErrorLocalizedAsync(strs.not_enough(CurrencySign));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -94,7 +94,7 @@ public partial class Utility : NadekoModule
|
|||||||
|
|
||||||
var rng = new NadekoRandom();
|
var rng = new NadekoRandom();
|
||||||
var arr = await Task.Run(() => socketGuild.Users
|
var arr = await Task.Run(() => socketGuild.Users
|
||||||
.Where(u => u.Activities.FirstOrDefault()?.Name?.ToUpperInvariant()
|
.Where(u => u.Activities.FirstOrDefault()?.Name?.Trim().ToUpperInvariant()
|
||||||
== game)
|
== game)
|
||||||
.Select(u => u.Username)
|
.Select(u => u.Username)
|
||||||
.OrderBy(_ => rng.Next())
|
.OrderBy(_ => rng.Next())
|
||||||
@@ -639,4 +639,4 @@ public partial class Utility : NadekoModule
|
|||||||
else
|
else
|
||||||
await ReplyConfirmLocalizedAsync(strs.verbose_errors_disabled);
|
await ReplyConfirmLocalizedAsync(strs.verbose_errors_disabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,7 @@ namespace NadekoBot.Services;
|
|||||||
|
|
||||||
public sealed class StatsService : IStatsService, IReadyExecutor, INService
|
public sealed class StatsService : IStatsService, IReadyExecutor, INService
|
||||||
{
|
{
|
||||||
public const string BOT_VERSION = "4.3.15";
|
public const string BOT_VERSION = "4.3.17";
|
||||||
|
|
||||||
public string Author
|
public string Author
|
||||||
=> "Kwoth#2452";
|
=> "Kwoth#2452";
|
||||||
|
Reference in New Issue
Block a user