mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-22 19:05:09 -04:00
Bump framework version and small cleanup
This commit is contained in:
parent
bb2b04d2e5
commit
f7ef3bbb44
5 changed files with 9 additions and 6 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net45</TargetFramework>
|
||||
<TargetFramework>net461</TargetFramework>
|
||||
<Version>2.3</Version>
|
||||
<Company>Tyrrrz</Company>
|
||||
<Copyright>Copyright (c) 2017-2018 Alexey Golub</Copyright>
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace DiscordChatExporter.Cli.ViewModels
|
|||
// Generate file path if not set
|
||||
if (filePath.IsBlank())
|
||||
{
|
||||
filePath = $"{guild} - {channel}.{format.GetFileExtension()}"
|
||||
filePath = $"{guild.Name} - {channel.Name}.{format.GetFileExtension()}"
|
||||
.Replace(Path.GetInvalidFileNameChars(), '_');
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net45</TargetFramework>
|
||||
<TargetFramework>net461</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using Tyrrrz.Extensions;
|
||||
using System.Globalization;
|
||||
using Tyrrrz.Extensions;
|
||||
|
||||
namespace DiscordChatExporter.Core.Models
|
||||
{
|
||||
|
@ -14,9 +15,11 @@ namespace DiscordChatExporter.Core.Models
|
|||
|
||||
public string AvatarHash { get; }
|
||||
|
||||
public string DefaultAvatarHash => (Discriminator % 5).ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
public string AvatarUrl => AvatarHash.IsNotBlank()
|
||||
? $"https://cdn.discordapp.com/avatars/{Id}/{AvatarHash}.png"
|
||||
: $"https://cdn.discordapp.com/embed/avatars/{Discriminator % 5}.png";
|
||||
: $"https://cdn.discordapp.com/embed/avatars/{DefaultAvatarHash}.png";
|
||||
|
||||
public User(string id, int discriminator, string name, string avatarHash)
|
||||
{
|
||||
|
|
|
@ -81,7 +81,7 @@ namespace DiscordChatExporter.Gui.ViewModels
|
|||
Guild = m.Guild;
|
||||
Channel = m.Channel;
|
||||
SelectedFormat = _settingsService.LastExportFormat;
|
||||
FilePath = $"{Guild} - {Channel}.{SelectedFormat.GetFileExtension()}"
|
||||
FilePath = $"{Guild.Name} - {Channel.Name}.{SelectedFormat.GetFileExtension()}"
|
||||
.Replace(Path.GetInvalidFileNameChars(), '_');
|
||||
From = null;
|
||||
To = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue