using NetCord; using NetCord.Services.ApplicationCommands; using StreakBot.Services; namespace StreakBot.Commands; public class RestoreCommand : ApplicationCommandModule { private readonly StreakService _streakService; public RestoreCommand(StreakService streakService) { _streakService = streakService; } [SlashCommand("restore", "Restores your streak with another user after it has been reset. Limited to 5 restores per month.")] public async Task Restore( [SlashCommandParameter(Name = "user", Description = "The user to restore your streak with")] User user) { var initiatorId = Context.User.Id; var targetId = user.Id; if (initiatorId == targetId) { return "You can't restore a streak with yourself!"; } if (user.IsBot) { return "You can't restore a streak with a bot!"; } return await _streakService.RestoreStreakAsync(initiatorId, targetId); } }