Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
JustHxnry authored Sep 16, 2021
1 parent 1529709 commit e44f20e
Show file tree
Hide file tree
Showing 4 changed files with 450 additions and 0 deletions.
1 change: 1 addition & 0 deletions START.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node .
44 changes: 44 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
try {
const RPC = require('discord-rpc');
const client = new RPC.Client({
transport: 'ipc'
});
const dotenv = require("dotenv")

dotenv.config()

var d1 = new Date();
var d = d1.setHours(0,0,0,0); // next midnight

client.on('ready', () => {
client.request('SET_ACTIVITY', {
pid: process.pid,
activity: {
details: process.env.DETAILS,
state: process.env.STATE,
timestamps: {
start: d
},
assets: {
large_image: process.env.LARGEIMG,
large_text: process.env.LARGETXT,
small_image: process.env.SMALLIMG,
small_text: process.env.SMALLTXT
},
buttons: [
{ label: process.env.FIRSTBUTTONTEXT, url: process.env.FIRSTBUTTONURL },
{ label: process.env.SECONDBUTTONTEXT, url: process.env.SECONDBUTTONURL }
]
}
});
});

console.log("Starting . . . . . . ");

client.login({
clientId: process.env.ID, //Change to your app ID
clientSecret: process.env.SECRET //Secret can be found at O2Auth bookmark
})
} catch(error) {
console.log(error);
}
Loading

0 comments on commit e44f20e

Please sign in to comment.