chore(lib): add some fixes on the defaults lib code

Signed-off-by: Andrei Jiroh Eugenio Halili <ajhalili2006@gmail.com>
This commit is contained in:
Andrei Jiroh Halili 2022-03-13 22:53:46 +08:00
parent 634a84f00a
commit 288d0ab809
Signed by: ajhalili2006
GPG Key ID: A30EBE40AD856D88
2 changed files with 9 additions and 7 deletions

8
app.js
View File

@ -20,9 +20,6 @@ app.get("/changeTeams/:teamSlug", (res, req) => {
}
})
app.listen(port, () => {
console.log("info: REST API is up at http://localhost:"+port+", see the docs for details on how to use it.")
})
client.on('ready', async () => {
client.request("SET_ACTIVITY", { pid: process.pid, activity: defaultActivity });
@ -31,7 +28,10 @@ client.on('ready', async () => {
client.on('connected', async () => {
console.log("info: Connected to Discord RPC");
});
app.listen(port, () => {
console.log("info: REST API is up at http://localhost:"+port+", see the docs for details on how to use it.")
})
// Uses the unofficial MCC.Live OAuth client ID from Andrei Jiroh.
client.login({ clientId: "952456760948559932" });
client.login({ clientId: "952456760948559932" });

View File

@ -3,8 +3,8 @@ let defaultActivity = {
assets: {
large_image: "mcc-twitter",
large_text: "MC Championship",
small_image: "",
small_text: ""
small_image: "spectator",
small_text: "Probably watching on Admin Stream soon"
},
buttons: [
{
@ -23,4 +23,6 @@ let defaultActivity = {
}
}
module.exports = defaultActivity
module.exports = {
defaultActivity
}