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 left-guild-message

This commit is contained in:
Macintxsh 2024-03-18 22:36:15 +03:00 committed by GitHub
commit b663bad91c
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"> <data name="DefaultWelcomeMessage" xml:space="preserve">
<value>{0}, welcome to {1}</value> <value>{0}, welcome to {1}</value>
</data> </data>
<data name="Sound1" xml:space="preserve"> <data name="Loaded1" xml:space="preserve">
<value>Veemo!</value> <value>Veemo!</value>
</data> </data>
<data name="Sound2" xml:space="preserve"> <data name="Loaded2" xml:space="preserve">
<value>Woomy!</value> <value>Woomy!</value>
</data> </data>
<data name="Sound3" xml:space="preserve"> <data name="Loaded3" xml:space="preserve">
<value>Ngyes!</value> <value>Ngyes!</value>
</data> </data>
<data name="YouWereBanned" xml:space="preserve"> <data name="YouWereBanned" xml:space="preserve">

View file

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

View file

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

View file

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

View file

@ -66,21 +66,21 @@ namespace Octobot {
} }
} }
internal static string Sound1 { internal static string Loaded1 {
get { get {
return ResourceManager.GetString("Sound1", resourceCulture); return ResourceManager.GetString("Loaded1", resourceCulture);
} }
} }
internal static string Sound2 { internal static string Loaded2 {
get { get {
return ResourceManager.GetString("Sound2", resourceCulture); return ResourceManager.GetString("Loaded2", resourceCulture);
} }
} }
internal static string Sound3 { internal static string Loaded3 {
get { 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 i = Random.Shared.Next(1, 4);
var embed = new EmbedBuilder().WithSmallTitle(bot.GetTag(), bot) var embed = new EmbedBuilder().WithSmallTitle(bot.GetTag(), bot)
.WithTitle($"Sound{i}".Localized()) .WithTitle($"Loaded{i}".Localized())
.WithDescription(Messages.Ready) .WithDescription(Messages.Ready)
.WithCurrentTimestamp() .WithCurrentTimestamp()
.WithColour(ColorsList.Blue) .WithColour(ColorsList.Blue)

View file

@ -151,6 +151,13 @@ public sealed partial class MemberUpdateService : BackgroundService
return Result.FromSuccess(); 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( var unbanResult = await _guildApi.RemoveGuildBanAsync(
guildId, id, Messages.PunishmentExpired.EncodeHeader(), ct); guildId, id, Messages.PunishmentExpired.EncodeHeader(), ct);
if (unbanResult.IsSuccess) if (unbanResult.IsSuccess)