Browse Source

Set Stream.Position in FileAttachment-ctor to 0 (#2063)

Co-authored-by: Christoph Liebender <c.liebender@vision4quality.de>
tags/3.2.1
Christoph L GitHub 3 years ago
parent
commit
6dada66992
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/Discord.Net.Core/Entities/Messages/FileAttachment.cs

+ 5
- 0
src/Discord.Net.Core/Entities/Messages/FileAttachment.cs View File

@@ -32,6 +32,11 @@ namespace Discord
FileName = fileName;
Description = description;
Stream = stream;
try
{
Stream.Position = 0;
}
catch { }
IsSpoiler = isSpoiler;
}



Loading…
Cancel
Save