mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-08-16 15:33:02 -06:00
Add third parameter for ID of parent channel
This commit is contained in:
parent
7bfb1c6fcc
commit
0792ca7691
|
|
@ -209,15 +209,16 @@ public partial class ExportRequest
|
||||||
// We are looking for any structure in the path which contains either %y or %z. If the channel is a thread, we can resolve the placeholders, otherwise, that whole structure needs to be removed.
|
// We are looking for any structure in the path which contains either %y or %z. If the channel is a thread, we can resolve the placeholders, otherwise, that whole structure needs to be removed.
|
||||||
string formattedPath = Regex.Replace(
|
string formattedPath = Regex.Replace(
|
||||||
preFormattedPath,
|
preFormattedPath,
|
||||||
@"\\[^\\]*%[yz][^\\]*\\",
|
@"\\[^\\]*%[xyz][^\\]*\\",
|
||||||
m =>
|
m =>
|
||||||
channel.IsThread
|
channel.IsThread
|
||||||
? Regex.Replace(
|
? Regex.Replace(
|
||||||
m.Value,
|
m.Value,
|
||||||
"%[yz]",
|
"%[xyz]",
|
||||||
n =>
|
n =>
|
||||||
n.Value switch
|
n.Value switch
|
||||||
{
|
{
|
||||||
|
"%x" => channel.Parent?.Id.ToString() ?? "",
|
||||||
"%y"
|
"%y"
|
||||||
=> channel
|
=> channel
|
||||||
.Parent?.Position
|
.Parent?.Position
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue