Added many more braces for multiline if's, Improved .crypto command quite a bit and applied locale-specific format

This commit is contained in:
Kwoth
2022-02-04 06:00:17 +01:00
parent f77f2f433f
commit eda38e64d1
129 changed files with 635 additions and 233 deletions

View File

@@ -193,8 +193,10 @@ public sealed class RepeaterService : IReadyExecutor, INService
var channel = _client.GetChannel(repeater.ChannelId) as ITextChannel;
if (channel is null)
{
try { channel = await _client.Rest.GetChannelAsync(repeater.ChannelId) as ITextChannel; }
catch { }
}
if (channel is null)
{
@@ -210,6 +212,7 @@ public sealed class RepeaterService : IReadyExecutor, INService
}
if (_noRedundant.Contains(repeater.Id))
{
try
{
var lastMsgInChannel = await channel.GetMessagesAsync(2).Flatten().FirstAsync();
@@ -224,8 +227,10 @@ public sealed class RepeaterService : IReadyExecutor, INService
guild.Id,
channel.Id);
}
}
if (repeater.LastMessageId is { } lastMessageId)
{
try
{
var oldMsg = await channel.GetMessageAsync(lastMessageId);
@@ -239,6 +244,7 @@ public sealed class RepeaterService : IReadyExecutor, INService
guild.Id,
channel.Id);
}
}
var rep = new ReplacementBuilder().WithDefault(guild.CurrentUser, channel, guild, _client).Build();