-
Notifications
You must be signed in to change notification settings - Fork 1
/
create-commands.yaml
67 lines (67 loc) · 2.35 KB
/
create-commands.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
- name: Upsert commands
hosts: localhost
connection: local
vars_files:
- secrets.yaml
tasks:
- uri:
url: https://discord.com/api/v8/applications/{{ application_id }}/commands
headers:
Authorization: Bearer {{ token }}
body_format: json
body: "{{ item }}"
status_code: [200, 201]
method: POST
loop: [
{
"name": "search",
"description": "Performs a search with the provided options.",
"options": [
{
"type": 3,
"name": "content",
"description": "The text to search for.",
"required": true
},
{
"type": 3,
"name": "repo",
"description": "Only include results from repos who match the regexp. Only one can be specified, else use raw query."
},
{
"type": 3,
"name": "rev",
"description": "Search a revision instead of the default branch. 'rev' can only be used in conjunction with 'repo'."
},
{
"type": 3,
"name": "pattern-type",
"description": "Configure your query to be interpreted literally, regexp, or structural pattern. Default is literal.",
"choices": [{"name": "Literal", "value": "literal"}, {"name": "Regular Expression", "value": "regexp"}, {"name": "Structural", "value": "structural"}]
},
{
"type": 3,
"name": "language",
"description": "Only include results from files in the specified programming language."
},
{
"type": 5,
"name": "case",
"description": "Perform a case sensitive query. Without this, everything is matched case insensitively."
}
]
},
{
"name": "raw-search",
"description": "Performs a search from a raw search string, as from a Sourcegraph installation.",
"options": [
{
"type": 3,
"name": "query",
"description": "The raw query to perform.",
"required": true
}
]
}
]