mirror of
https://onedev.fprog.nl/DiscordClient
synced 2026-01-07 04:23:42 +01:00
If author isn't specified, assume author as this user.
This commit is contained in:
parent
183c002bda
commit
be5fd71935
|
|
@ -66,11 +66,10 @@ int finalCode = await CommandLine
|
||||||
},
|
},
|
||||||
async (ScanOptions opt) =>
|
async (ScanOptions opt) =>
|
||||||
{
|
{
|
||||||
// This should never happen author required.
|
|
||||||
if (opt.Author is null)
|
if (opt.Author is null)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Author ID is null.");
|
Console.WriteLine("Author ID is null. Default to this user being author.");
|
||||||
return 1;
|
opt.Author = client.MyDiscordId;
|
||||||
}
|
}
|
||||||
|
|
||||||
int totalMessages = 1;
|
int totalMessages = 1;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace DiscordDelete
|
||||||
[Option('c', "channel", ResourceType = typeof(string))]
|
[Option('c', "channel", ResourceType = typeof(string))]
|
||||||
public string? ChannelId { get; set; }
|
public string? ChannelId { get; set; }
|
||||||
|
|
||||||
[Option('a', "author", Required = true, ResourceType = typeof(string))]
|
[Option('a', "author", Required = false, ResourceType = typeof(string), Default = null)]
|
||||||
public string? Author { get; set; }
|
public string? Author { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue