diff --git a/Dockerfile b/Dockerfile index fab8ff55c..4615d8622 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,12 +28,11 @@ WORKDIR /app RUN set -xe; \ useradd -m nadeko; \ 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; \ 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; \ - apt-get purge -y python3-pip; \ - chmod +x /usr/local/bin/youtube-dl; \ + curl -Lo /usr/local/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp; \ + chmod a+rx /usr/local/bin/yt-dlp; \ apt-get autoremove -y; \ apt-get autoclean -y diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..f8369185b --- /dev/null +++ b/docker-compose.yml @@ -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 diff --git a/src/Nadeko.Bot.Modules.Administration/ServerLog/ServerLogCommandService.cs b/src/Nadeko.Bot.Modules.Administration/ServerLog/ServerLogCommandService.cs index d52073a7e..f13a1815f 100644 --- a/src/Nadeko.Bot.Modules.Administration/ServerLog/ServerLogCommandService.cs +++ b/src/Nadeko.Bot.Modules.Administration/ServerLog/ServerLogCommandService.cs @@ -97,7 +97,8 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor if (!GuildLogSettings.TryGetValue(gu.Guild.Id, out var logSetting) || before is null - || after is null) + || after is null + || logSetting.LogIgnores.Any(ilc => ilc.LogItemId == gu.Id && ilc.ItemType == IgnoredItemType.User)) return; ITextChannel? logChannel; @@ -349,7 +350,7 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor 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; ITextChannel? logChannel; @@ -1355,4 +1356,4 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor GuildLogSettings.AddOrUpdate(guildId, newLogSetting, (_, _) => newLogSetting); uow.SaveChanges(); } -} \ No newline at end of file +} diff --git a/src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/WaifuClaimCommands.cs b/src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/WaifuClaimCommands.cs index 5710480b2..11589a18a 100644 --- a/src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/WaifuClaimCommands.cs +++ b/src/Nadeko.Bot.Modules.Gambling/Gambling/Waifus/WaifuClaimCommands.cs @@ -284,11 +284,10 @@ public partial class Gambling var fansList = await _service.GetFansNames(wi.WaifuId); var fansStr = fansList - .Shuffle() - .Take(30) - .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)) fansStr = "-"; diff --git a/src/NadekoBot/data/aliases.yml b/src/NadekoBot/data/aliases.yml index afcc0841b..897d0fc36 100644 --- a/src/NadekoBot/data/aliases.yml +++ b/src/NadekoBot/data/aliases.yml @@ -1360,7 +1360,7 @@ medusainfo: - meinfo medusasearch: - medusasearch - - mesearch + - mesearchW # Bank stuff bankdeposit: - deposit