ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 13475

discord script to say you are streaming

by topkek - 01-03-2017 - 02:07 PM
#1
I will be showing you how to act like you are streaming on discord.js when you are not
[Image: T7VJfBf.png]

you will need any version of node.js above 6.* installed by Clicking here 
I have v6.9.2 LTS installed




now open up node.js console or cmd (if you checked the option to add node.js to path if not then run node.js console) and type in npm install discord.js
you should see npm in the title of the cmd box thing like this then you know you are doing it right
[Image: eUkuMZM.png]
Ignore any errors or warnings you get that's just saying some other modules discord.js use is not installed or if you want to use them it wont work unless you have them installed

now we got node.js installed and the discord.js module installed now we move onto getting are token for are account (MAKE SURE YOU DON'T SHARE THIS WITH ANYONE THEY CAN DESTROY ANY SERVER YOU OWN OR MESS UP YOUR ACCOUNT)


on the desktop client of discord or chrome open console up by CTRL+shift+i and click on console like this and type in localStorage.token and you should get your token
[Image: RvhnSov.png]

make sure you copy the token that is inside the double qoutes

save this script to your desktop as something like this discord.js replace the text which says MY TOKEN HERE with your token and the text that says change me to any text you want to what you want the viewer will see


PHP Code:
var Discord = require("discord.js");
var 
bot = new Discord.Client();

bot.on("ready", () => {
  console.log("You are connected to " bot.guilds.size " servers!");
  bot.user.setGame("change me to any text you want""https://www.twitch.tv/monstercat")
});
bot.login('MY TOKEN HERE'); 



now to run the scrip just do node discord.js if you get anything else other than this post the error here and I will look at it and try to help you out
[Image: 43rTtAJ.png]
Reply
#2
Nice tutorial. I may recreate for discord.py :)
Reply
#3
Nice tutorial help me!
:)
Reply
#4
Wow, this is super cool. Good job.
Reply
#5
Thanks, man. Gotta try this.
Reply
#6
I believe that this should not be done as it's likely to get detected by century (the Discord trust/safety team) and may ban you as you are logging in as a bot account on a standard account.
Reply
#7
Good tutorial except for the fact that the setGame() method is deprecated I code discord bots and setActivity is what you should use, but otherwise great tutorial!
Reply
#8
Nice one, someone should make a wondows app for it.
Reply
#9
Good tutorial except for getting the token. The method that you use to get the token is actually outdated. Instead what you should do is go to the "NETWORK" tab of the Inspector. Once in the Network tab type "/api" into the bar at the top left with the placeholder "Filter" and then you should find a value with the name "messages?limit=50" Click on that then click the "Headers" tab. Under "Request Headers" you should find authorization where you will find your token.
Reply
#10
(01-03-2017 - 02:07 PM)topkek Wrote: I will be showing you how to act like you are streaming on discord.js when you are not
[Image: T7VJfBf.png]

you will need any version of node.js above 6.* installed by Clicking here 
I have v6.9.2 LTS installed




now open up node.js console or cmd (if you checked the option to add node.js to path if not then run node.js console) and type in npm install discord.js
you should see npm in the title of the cmd box thing like this then you know you are doing it right
[Image: eUkuMZM.png]
Ignore any errors or warnings you get that's just saying some other modules discord.js use is not installed or if you want to use them it wont work unless you have them installed

now we got node.js installed and the discord.js module installed now we move onto getting are token for are account (MAKE SURE YOU DON'T SHARE THIS WITH ANYONE THEY CAN DESTROY ANY SERVER YOU OWN OR MESS UP YOUR ACCOUNT)


on the desktop client of discord or chrome open console up by CTRL+shift+i and click on console like this and type in localStorage.token and you should get your token
[Image: RvhnSov.png]

make sure you copy the token that is inside the double qoutes

save this script to your desktop as something like this discord.js replace the text which says MY TOKEN HERE with your token and the text that says change me to any text you want to what you want the viewer will see


PHP Code:
var Discord = require("discord.js");
var 
bot = new Discord.Client();

bot.on("ready", () => {
  console.log("You are connected to " bot.guilds.size " servers!");
  bot.user.setGame("change me to any text you want""https://www.twitch.tv/monstercat")
});
bot.login('MY TOKEN HERE'); 



now to run the scrip just do node discord.js if you get anything else other than this post the error here and I will look at it and try to help you out
[Image: 43rTtAJ.png]
Reply

Users browsing: 3 Guest(s)