mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
chore: more todos
This commit is contained in:
parent
77f5642307
commit
021a5ae897
2 changed files with 5 additions and 3 deletions
|
|
@ -73,6 +73,7 @@ public class Parameters
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: im not really sure if this should be the way to go
|
||||||
public class ResolvedParameters
|
public class ResolvedParameters
|
||||||
{
|
{
|
||||||
public readonly Parameters Raw;
|
public readonly Parameters Raw;
|
||||||
|
|
@ -87,11 +88,11 @@ public class ResolvedParameters
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: move this to another file
|
// TODO: move this to another file (?)
|
||||||
public static class ParametersExt
|
public static class ParametersExt
|
||||||
{
|
{
|
||||||
public static bool HasFlag(this Parameters parameters, params string[] potentialMatches)
|
public static bool HasFlag(this Parameters parameters, params string[] potentialMatches)
|
||||||
{
|
{
|
||||||
return potentialMatches.Any(parameters.Flags().ContainsKey);
|
return potentialMatches.Any(parameters.Flags().ContainsKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,7 @@ public class MessageCreated: IEventHandler<MessageCreateEvent>
|
||||||
catch (PKError e)
|
catch (PKError e)
|
||||||
{
|
{
|
||||||
// don't send an "invalid command" response if the guild has those turned off
|
// don't send an "invalid command" response if the guild has those turned off
|
||||||
|
// TODO: only dont send command not found, not every parse error (eg. missing params, syntax error...)
|
||||||
if (!(ctx.GuildConfig != null && ctx.GuildConfig!.InvalidCommandResponseEnabled != true))
|
if (!(ctx.GuildConfig != null && ctx.GuildConfig!.InvalidCommandResponseEnabled != true))
|
||||||
{
|
{
|
||||||
await ctx.Reply($"{Emojis.Error} {e.Message}");
|
await ctx.Reply($"{Emojis.Error} {e.Message}");
|
||||||
|
|
@ -211,4 +212,4 @@ public class MessageCreated: IEventHandler<MessageCreateEvent>
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue