Skip to content

Commit

Permalink
Update MoveCommand.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
OoLunar authored Oct 1, 2024
1 parent 35d1ef0 commit dde5139
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Commands/Moderation/MoveCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ public async ValueTask MoveAsync(CommandContext context, DiscordChannel channel,
foreach (DiscordMessage message in messages.OrderBy(x => x.CreationTimestamp))
{
webhookBuilder = new DiscordWebhookBuilder(new DiscordMessageBuilder(message));
DiscordMember member = (DiscordMember)message.Author!;
webhookBuilder.WithUsername(member.DisplayName);
webhookBuilder.WithAvatarUrl(member.GuildAvatarUrl ?? member.AvatarUrl);
webhookBuilder.WithUsername(message.Author!.GetDisplayName());
webhookBuilder.WithAvatarUrl(message.Author is DiscordMember member ? member.GuildAvatarUrl : message.Author!.AvatarUrl);
if (channel.Type is DiscordChannelType.NewsThread or DiscordChannelType.PublicThread or DiscordChannelType.PrivateThread)
{
webhookBuilder.WithThreadId(channel.Id);
Expand Down

0 comments on commit dde5139

Please sign in to comment.