Skip to content

Instantly share code, notes, and snippets.

View Aiden-Garth's full-sized avatar

Aiden Garth Aiden-Garth

  • @True-Coder-LTD
  • Scotland, United Kingdom
View GitHub Profile
client.user.setActivity(`${client.guilds.size} Servers`, {
^
TypeError: Cannot read property 'setActivity' of null
at Object.<anonymous> (B:\NODE\DISCORD\DISCORD.JS\TrueBot\src\index.js:15:13)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
@Aiden-Garth
Aiden-Garth / index.js
Last active October 18, 2018 21:17
THU 18/10/2018 ~ TrueBot Error
const Discord = require("discord.js");
const client = new Discord.Client();
require("dotenv").config();
const env = process.env;
const version = "v1.0.1 - 2018-10-18";
const mainColor = "#7289DA";
const github = "https://github.com/True-Coder-Ltd/TrueBot";
client.login(env.TOKEN);
const Discord = require("discord.js");
const client = new Discord.Client({
disableEveryone: true
});
require("dotenv").config();
const env = process.env;
const token = env.DISCORD_TOKEN;
const prefix = env.PREFIX;
client.login(token)
})
^
SyntaxError: Unexpected token )
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)