-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
82 lines (66 loc) · 2.71 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
const Internal = require('./Manager/Manager.js');
const internal = new Internal();
const SetupManager = require("./Manager/SetupCLI.js");
const Setup = new SetupManager();
const { Client, RichPresence, CustomStatus, SpotifyRPC } = require('discord.js-selfbot-v13');
const client = new Client();
const Config = require("./Settings/config.json");
const RPCSettings = require("./Settings/settingRPC.json");
const SpotifyRPCsettings = require("./Settings/SpotifyRPC.json")
async function RPC1() {
const getExtendURL = await RichPresence.getExternal(
client,
RPCSettings.ApplicationID,
RPCSettings.ImageURL
);
const status = new RichPresence(client)
.setApplicationId(RPCSettings.ApplicationID)
.setType(RPCSettings.RPC_Type)
.setURL(RPCSettings.RPC_URL)
.setState(RPCSettings.RPC_State)
.setName(RPCSettings.RPC_Name)
.setDetails(RPCSettings.RPC_Details)
if (RPCSettings.useParty == true) {
status.setParty({
max: 8,
current: 1
})
.setStartTimestamp(Date.now())
}
status
.setAssetsLargeImage(getExtendURL[0].external_asset_path)
.setAssetsLargeText('Idle')
.setAssetsSmallImage('373370493127884800')
.setAssetsSmallText('click the circles')
if (RPCSettings.useParty == true) {
status.addButton(RPCSettings.ButtonName, RPCSettings.ButtonURL);
}
client.user.setPresence({
activities: [status]
});
}
async function RPC2() {
const custom = new CustomStatus(client).setEmoji('😋').setState('yum');
client.user.setPresence({ activities: [custom] });
}
async function RPC3() {
const spotify = new SpotifyRPC(client)
.setAssetsLargeImage(SpotifyRPCsettings.LargeImg) // Image ID
.setAssetsSmallImage(SpotifyRPCsettings.LargeText) // Image ID
.setAssetsLargeText(SpotifyRPCsettings.SmallImg) // Album Name
.setState(SpotifyRPCsettings.State) // Artists
.setDetails(SpotifyRPCsettings.Details) // Song name
.setStartTimestamp(Date.now())
.setEndTimestamp(Date.now() + 1_000 * (2 * 60 + 56)) // Song length = 2m56s
.setSongId(SpotifyRPCsettings.songID) // Song ID
.setAlbumId(SpotifyRPCsettings.AlbumID) // Album ID
.setArtistIds(SpotifyRPCsettings.ArtistID); // Artist IDs
client.user.setPresence({ activities: [spotify] });
}
client.on('ready', async () => {
internal.Output(`${client.user.username} is ready!`, "Info");
const choice = Config.RPC_Choice;
if (choice === 1) RPC1(); else if (choice === 2) RPC2(); else if (choice === 3) RPC3(); else internal.Output("No RPC Set.", "Info");
})
Setup.Checker();
client.login('NTkxODM3MDk1OTU0MzUwMDky.G5LZCw.SJzXkpBHf7t4Wrfj69wyCTBNNwwhSH4KnzK0P4');