-
Notifications
You must be signed in to change notification settings - Fork 0
/
DisCatSharp CheckBase.snippet
49 lines (49 loc) · 1.54 KB
/
DisCatSharp CheckBase.snippet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>DisCatSharp Empty Custom Precondition Attribute</Title>
<Author>FRNathan13</Author>
<Description>Create empty custom precondition attribute.</Description>
<HelpUrl>
</HelpUrl>
<Shortcut>dcs_checkbase</Shortcut>
</Header>
<Snippet>
<Imports>
<Import>
<Namespace>System</Namespace>
</Import>
<Import>
<Namespace>System.Threading.Tasks</Namespace>
</Import>
<Import>
<Namespace>DisCatSharp.CommandsNext</Namespace>
</Import>
<Import>
<Namespace>DisCatSharp.CommandsNext.Attributes</Namespace>
</Import>
</Imports>
<Declarations>
<Literal Editable="true">
<ID>AttributeName</ID>
<ToolTip>AttributeName</ToolTip>
<Default>AttributeName</Default>
<Function>
</Function>
</Literal>
</Declarations>
<Code Language="csharp" Delimiter="$" Kind="type decl"><![CDATA[[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
public class $AttributeName$Attribute : CheckBaseAttribute
{
public override async Task<bool> ExecuteCheckAsync(CommandContext ctx, bool help)
{
$selected$$end$
}
}]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>