mirror of
https://onedev.fprog.nl/DiscordClient
synced 2025-12-29 06:28:37 +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) =>
|
||||
{
|
||||
// This should never happen author required.
|
||||
if (opt.Author is null)
|
||||
{
|
||||
Console.WriteLine("Author ID is null.");
|
||||
return 1;
|
||||
Console.WriteLine("Author ID is null. Default to this user being author.");
|
||||
opt.Author = client.MyDiscordId;
|
||||
}
|
||||
|
||||
int totalMessages = 1;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace DiscordDelete
|
|||
[Option('c', "channel", ResourceType = typeof(string))]
|
||||
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; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue