-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.js
52 lines (50 loc) · 1.6 KB
/
commands.js
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
import { SlashCommandBuilder } from '@discordjs/builders'
import geckoFunction from './commands/gecko.js'
import getCodeFunction from './commands/getCode.js'
import graphFunction from './commands/graph.js'
export const commands = [
new SlashCommandBuilder()
.setName('gecko')
.setDescription('Fetch current price')
.addStringOption(option => (
option
.setName('crypto')
.setDescription('The currency to fetch for.')
.setRequired(true)
))
.addStringOption(option => (
option
.setName('fiat')
.setDescription('The currency unit to convert to.')
.setRequired(true)
)),
new SlashCommandBuilder()
.setName('graph')
.setDescription('Display a community-driven currency graph')
.addStringOption(option => (
option
.setName('currency')
.setDescription('The currency to fetch for.')
.setRequired(true)
))
.addStringOption(option => (
option
.setName('fiat')
.setDescription('The currency unit to convert to.')
.setRequired(true)
)),
new SlashCommandBuilder()
.setName('getcode')
.setDescription('search for crypto currency code')
.addStringOption(option => (
option
.setName('query')
.setDescription('The currency to search for')
.setRequired(true)
))
]
export const functions = {
'gecko': geckoFunction,
'getcode': getCodeFunction,
'graph': graphFunction
}