From 97afd7d69bac25ef019f5c0ec2160973a527840d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=A8=D0=B8?= =?UTF-8?q?=D0=BC=D0=B0=D0=BD=D1=81=D0=BA=D0=B8=D0=B9?= Date: Fri, 17 Nov 2023 00:01:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=D0=B2=D0=B5=D0=B4=D0=B5=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D1=82=D0=B8=D0=BF=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controllers/WeatherForecastController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controllers/WeatherForecastController.cs b/Controllers/WeatherForecastController.cs index 7260c56..fb3e3c8 100644 --- a/Controllers/WeatherForecastController.cs +++ b/Controllers/WeatherForecastController.cs @@ -29,7 +29,7 @@ namespace DiscordApp.Controllers await Console.Out.WriteLineAsync(guild.Name); var channel = guild.GetChannel(channelid) as ITextChannel; await Console.Out.WriteLineAsync(channel.Name); - var message = channel.GetMessagesAsync().FirstOrDefaultAsync(k => k.Any(l => l.Author.Id == 1166079976446103602)).Result.FirstOrDefault() as IUserMessage; + var message = ((IReadOnlyCollection)channel.GetMessagesAsync().ToArrayAsync().Result).FirstOrDefault(k => k.Id == 1166079976446103602) as IUserMessage; await Console.Out.WriteLineAsync(message.Author.GlobalName); await message.ModifyAsync(func => {