mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
Merge branch 'v4' into v5
This commit is contained in:
@@ -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
|
@@ -97,7 +97,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;
|
||||||
@@ -349,7 +350,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;
|
||||||
@@ -1355,4 +1356,4 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor
|
|||||||
GuildLogSettings.AddOrUpdate(guildId, newLogSetting, (_, _) => newLogSetting);
|
GuildLogSettings.AddOrUpdate(guildId, newLogSetting, (_, _) => newLogSetting);
|
||||||
uow.SaveChanges();
|
uow.SaveChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -284,11 +284,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
|
||||||
.Shuffle()
|
.Shuffle()
|
||||||
.Take(30)
|
.Take(30)
|
||||||
.Select((x) => claimsNames.Contains(x) ? $"{x} 💞" : x)
|
.Select((x) => claimsNames.Contains(x) ? $"{x} 💞" : x)
|
||||||
.Join('\n');
|
.Join('\n');
|
||||||
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(fansStr))
|
if (string.IsNullOrWhiteSpace(fansStr))
|
||||||
fansStr = "-";
|
fansStr = "-";
|
||||||
|
@@ -1360,7 +1360,7 @@ medusainfo:
|
|||||||
- meinfo
|
- meinfo
|
||||||
medusasearch:
|
medusasearch:
|
||||||
- medusasearch
|
- medusasearch
|
||||||
- mesearch
|
- mesearchW
|
||||||
# Bank stuff
|
# Bank stuff
|
||||||
bankdeposit:
|
bankdeposit:
|
||||||
- deposit
|
- deposit
|
||||||
|
Reference in New Issue
Block a user