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

cool commit with cool things

This commit is contained in:
Macintxsh 2023-08-12 22:33:53 +03:00
parent d0d663d2bb
commit e60ee447c0
Signed by: mctaylors
GPG key ID: 2E1BF7AD0D4BB0B4
4 changed files with 14 additions and 10 deletions

View file

@ -253,10 +253,10 @@
<value>оъмъомоъемъъео((((</value> <value>оъмъомоъемъъео((((</value>
</data> </data>
<data name="EventCancelled" xml:space="preserve"> <data name="EventCancelled" xml:space="preserve">
<value>движуха "{0}" отменен!</value> <value>движуха "{0}" отменена!</value>
</data> </data>
<data name="EventCompleted" xml:space="preserve"> <data name="EventCompleted" xml:space="preserve">
<value>движуха "{0}" завершен!</value> <value>движуха "{0}" завершена!</value>
</data> </data>
<data name="Ever" xml:space="preserve"> <data name="Ever" xml:space="preserve">
<value>всегда</value> <value>всегда</value>

View file

@ -153,7 +153,9 @@ public class RemindCommandGroup : CommandGroup
[RequireContext(ChannelContext.Guild)] [RequireContext(ChannelContext.Guild)]
[UsedImplicitly] [UsedImplicitly]
public async Task<Result> ExecuteDeleteReminderAsync( public async Task<Result> ExecuteDeleteReminderAsync(
[MinValue(0)] int index) [Description("Index of reminder to delete")]
[MinValue(0)]
int index)
{ {
if (!_context.TryGetContextIDs(out var guildId, out _, out var userId)) if (!_context.TryGetContextIDs(out var guildId, out _, out var userId))
{ {

View file

@ -64,6 +64,7 @@ public class SettingsCommandGroup : CommandGroup
/// <summary> /// <summary>
/// A slash command that lists current per-guild GuildSettings. /// A slash command that lists current per-guild GuildSettings.
/// </summary> /// </summary>
/// <param name="page">The page number.</param>
/// <returns> /// <returns>
/// A feedback sending result which may or may not have succeeded. /// A feedback sending result which may or may not have succeeded.
/// </returns> /// </returns>
@ -75,7 +76,9 @@ public class SettingsCommandGroup : CommandGroup
[Description("Shows settings list for this server")] [Description("Shows settings list for this server")]
[UsedImplicitly] [UsedImplicitly]
public async Task<Result> ExecuteSettingsListAsync( public async Task<Result> ExecuteSettingsListAsync(
[Description("Settings list page")] int page) [Description("Settings list page")]
[MinValue(1)]
int page)
{ {
if (!_context.TryGetContextIDs(out var guildId, out _, out _)) if (!_context.TryGetContextIDs(out var guildId, out _, out _))
{ {

View file

@ -346,7 +346,7 @@ public sealed class ScheduledEventUpdateService : BackgroundService
IGuildScheduledEvent scheduledEvent, GuildData data, CancellationToken ct) IGuildScheduledEvent scheduledEvent, GuildData data, CancellationToken ct)
{ {
var currentUserResult = await _userApi.GetCurrentUserAsync(ct); var currentUserResult = await _userApi.GetCurrentUserAsync(ct);
if (!currentUserResult.IsDefined(out var currentUser)) if (!currentUserResult.IsDefined(out _))
{ {
return Result.FromError(currentUserResult); return Result.FromError(currentUserResult);
} }
@ -359,11 +359,10 @@ public sealed class ScheduledEventUpdateService : BackgroundService
} }
var earlyResult = new EmbedBuilder() var earlyResult = new EmbedBuilder()
.WithSmallTitle( .WithDescription(
string.Format(Messages.EventEarlyNotification, scheduledEvent.Name, string.Format(Messages.EventEarlyNotification, scheduledEvent.Name,
Markdown.Timestamp(scheduledEvent.ScheduledStartTime, TimestampStyle.RelativeTime)), currentUser) Markdown.Timestamp(scheduledEvent.ScheduledStartTime, TimestampStyle.RelativeTime)))
.WithColour(ColorsList.Default) .WithColour(ColorsList.Default)
.WithCurrentTimestamp()
.Build(); .Build();
if (!earlyResult.IsDefined(out var earlyBuilt)) if (!earlyResult.IsDefined(out var earlyBuilt))