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