1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-19 16:33:36 +03:00

Merge branch 'master' into gitinfo

This commit is contained in:
Macintxsh 2024-03-18 21:28:23 +03:00 committed by GitHub
commit d10bf3377c
Signed by: GitHub
GPG key ID: B5690EEEBB952194
7 changed files with 24 additions and 17 deletions

View file

@ -117,13 +117,13 @@
<data name="DefaultWelcomeMessage" xml:space="preserve">
<value>{0}, welcome to {1}</value>
</data>
<data name="Sound1" xml:space="preserve">
<data name="Loaded1" xml:space="preserve">
<value>Veemo!</value>
</data>
<data name="Sound2" xml:space="preserve">
<data name="Loaded2" xml:space="preserve">
<value>Woomy!</value>
</data>
<data name="Sound3" xml:space="preserve">
<data name="Loaded3" xml:space="preserve">
<value>Ngyes!</value>
</data>
<data name="YouWereBanned" xml:space="preserve">

View file

@ -117,13 +117,13 @@
<data name="DefaultWelcomeMessage" xml:space="preserve">
<value>{0}, добро пожаловать на сервер {1}</value>
</data>
<data name="Sound1" xml:space="preserve">
<data name="Loaded1" xml:space="preserve">
<value>Виимо!</value>
</data>
<data name="Sound2" xml:space="preserve">
<data name="Loaded2" xml:space="preserve">
<value>Вууми!</value>
</data>
<data name="Sound3" xml:space="preserve">
<data name="Loaded3" xml:space="preserve">
<value>Нгьес!</value>
</data>
<data name="PunishmentExpired" xml:space="preserve">

View file

@ -117,13 +117,13 @@
<data name="DefaultWelcomeMessage" xml:space="preserve">
<value>{0}, добро пожаловать на сервер {1}</value>
</data>
<data name="Sound1" xml:space="preserve">
<data name="Loaded1" xml:space="preserve">
<value>вииимо!</value>
</data>
<data name="Sound2" xml:space="preserve">
<data name="Loaded2" xml:space="preserve">
<value>вуууми!</value>
</data>
<data name="Sound3" xml:space="preserve">
<data name="Loaded3" xml:space="preserve">
<value>нгьес!</value>
</data>
<data name="YouWereBanned" xml:space="preserve">

View file

@ -35,7 +35,7 @@ public class ToolsCommandGroup : CommandGroup
public ToolsCommandGroup(
ICommandContext context, IFeedbackService feedback,
GuildDataService guildData, IDiscordRestGuildAPI guildApi,
IDiscordRestUserAPI userApi, IDiscordRestChannelAPI channelApi)
IDiscordRestUserAPI userApi)
{
_context = context;
_guildData = guildData;

View file

@ -66,21 +66,21 @@ namespace Octobot {
}
}
internal static string Sound1 {
internal static string Loaded1 {
get {
return ResourceManager.GetString("Sound1", resourceCulture);
return ResourceManager.GetString("Loaded1", resourceCulture);
}
}
internal static string Sound2 {
internal static string Loaded2 {
get {
return ResourceManager.GetString("Sound2", resourceCulture);
return ResourceManager.GetString("Loaded2", resourceCulture);
}
}
internal static string Sound3 {
internal static string Loaded3 {
get {
return ResourceManager.GetString("Sound3", resourceCulture);
return ResourceManager.GetString("Loaded3", resourceCulture);
}
}

View file

@ -88,7 +88,7 @@ public class GuildLoadedResponder : IResponder<IGuildCreate>
var i = Random.Shared.Next(1, 4);
var embed = new EmbedBuilder().WithSmallTitle(bot.GetTag(), bot)
.WithTitle($"Sound{i}".Localized())
.WithTitle($"Loaded{i}".Localized())
.WithDescription(Messages.Ready)
.WithCurrentTimestamp()
.WithColour(ColorsList.Blue)

View file

@ -151,6 +151,13 @@ public sealed partial class MemberUpdateService : BackgroundService
return Result.FromSuccess();
}
var existingBanResult = await _guildApi.GetGuildBanAsync(guildId, id, ct);
if (!existingBanResult.IsDefined())
{
data.BannedUntil = null;
return Result.FromSuccess();
}
var unbanResult = await _guildApi.RemoveGuildBanAsync(
guildId, id, Messages.PunishmentExpired.EncodeHeader(), ct);
if (unbanResult.IsSuccess)