-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
67 lines (59 loc) · 1.6 KB
/
index.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
const {token, cpf, OwnerID, discord_URL, disCommandHead } = require('./config.json');
const { CommandoClient } = require('discord.js-commando');
const fetch = require('node-fetch');
const client = new CommandoClient({
commandPrefix: cpf,
owner: OwnerID,
disableEveryone: true
});
var disCommands = {
"name": 'spltstats',
'type': 1,
'description': 'Splitgate Lifetime Stats from Tracker.GG',
'options': [{
'name': 'Platform',
'description': 'What platform is being used',
'type': 3,
'required': true,
'choices': [
{
'name': "Playstation",
'value': 'psn'
},
{
'name': 'Xbox',
'value': 'xbl'
},
{
'name': 'Steam',
'value': 'steam'
}
]
},
{
'name': 'Platform ID',
'description': 'Either your SteamID64, XBL Gamertag, or your PSN Username',
'type': 3,
'required': true
}]
}
client.registry
.registerDefaultTypes()
.registerGroups([
['group1', 'Default Group'],
['splitgate', "Commands for Splitgate"],
['moderation', 'Moderation Commands']
])
.registerDefaultGroups()
.registerDefaultCommands()
.registerCommandsIn(__dirname + "/commands");
client.on('ready', () => {
fetch(discord_URL, {
method: 'POST',
body: JSON.stringify(disCommands),
headers: disCommandHead
})
console.log('Logged in......');
client.user.setActivity('Splitgate');
});
client.login(token)