You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 4, 2019. It is now read-only.
thrownewError("Your node.js version isnt high enough "+chalk.red(process.version)+" < "+chalk.green("8.0.0+")+"\nInstall a higher version of "+chalk.yellow("node.js")+" by going to "+chalk.blue("https://nodejs.org/en/download")+"\n---\nDownload node.js version "+chalk.green("8")+" or higher.\n\n If you want more information go to \n "+chalk.blue("https://discordspark.com/errors/outdated_nodejs")+"\n\n");
returnconsole.log(`You're trying to start with ${chalk.red("an invalid option:")}${chalk.red("ignoreBots")}, Please read this article on the docs on how to use this option: ${chalk.blue("https://discordspark.com/documentation/config")}`)
52
-
}
53
-
if(options.ignoreBots==true){
54
-
options.ignoreBots=4;
55
-
}elseif(options.ignoreBots==false){
56
-
options.ignoreBots=null
57
-
}elseif(options.ignoreBots=="message"){
58
-
options.ignoreBots=1
59
-
}elseif(options.ignoreBots=="command"){
60
-
options.ignoreBots=2
61
-
}
50
+
returnnewPromise(function(resolve,reject){
62
51
63
-
Client=classClientextendsdiscord.Client{
64
-
constructor(config){
65
-
super(config)
66
-
this.version=require("./package.json").version
67
-
this.config={}
68
-
this.customConfig=newexports.DataStore()
69
-
this.CustomConfig=exports.CustomConfig
52
+
if(!confirmConfig(options)){
53
+
returnreject("There was an error in your configuration setup, There may be additional messages above.")
console.log(`You're trying to start with ${chalk.red("an invalid option:")}${chalk.red("ignoreBots")}, Please read this article on the docs on how to use this option: ${chalk.blue("https://discordspark.com/documentation/config")}`)
57
+
returnreject()
75
58
}
76
-
asyncstart(){
77
-
this.dataStore=awaitthis.dataStore;
78
-
if(this.config.first){
79
-
console.log(`Welcome to ${chalk.yellow(`Spark V${this.version}`)}!\nTo see the changelog for this update go to this page:\n${chalk.blue("https://github.com/TobiasFeld22/Spark/releases")}\nTo learn more about using Spark, please visit our docs:\n${chalk.blue("https://discordspark.com/")}\n-------------------`)
console.log(`Welcome to ${chalk.yellow(`Spark V${this.version}`)}!\nTo see the changelog for this update go to this page:\n${chalk.blue("https://github.com/TobiasFeld22/Spark/releases")}\nTo learn more about using Spark, please visit our docs:\n${chalk.blue("https://discordspark.com/")}\n-------------------`)
86
+
}
95
87
96
-
console.log(`Your bot (${chalk.yellow(this.user.tag)}) is now ${chalk.green("online!")} | Running on ${this.guilds.size} servers | ${chalk.yellow(`Spark v${this.version}`)}\nWe detected the following data:\n \n ${commandtext}${observertext}${enginetext}${snippettext}${permissiontext}${eventtext}`)
console.log(`Your bot (${chalk.yellow(this.user.tag)}) is now ${chalk.green("online!")} | Running on ${this.guilds.size} servers | ${chalk.yellow(`Spark v${this.version}`)}\nWe detected the following data:\n \n ${commandtext}${observertext}${enginetext}${snippettext}${permissiontext}${eventtext}`)
103
+
}
98
104
99
-
}
100
-
Client=newClient(options.clientOptions);
101
-
Client.on("cc_update",function(data){
102
-
Client.customConfig.set(data.id,data)
103
-
});
104
-
Client.config=options
105
-
Client.login(options.token).then(async()=>{
106
-
try{
107
-
varapplication=awaitClient.fetchApplication()
108
-
Client.config.ownerID=application.owner.id
109
-
}catch(e){
110
-
console.log(e)
111
-
throwError("Couldn't fetch application, token may be a invalid / user token. ")
embed.setTitle(`Information about ${client.user.username}`)
19
-
embed.setDescription(`Hello, I am ${client.user.tag}. I am owned and maintained by <@${client.config.ownerID}>, created with the Discord.JS framework known as **Spark**.\n\n`+
20
-
"Spark is a powerful modular framework that makes creating Discord bots easy.")
embed.addField("More Information:","Feel free to visit our [website](https://discordspark.com) or our discord [server](https://discord.gg/TezD2Zg) for more information about the Spark Framework.",false)
27
-
embed.setFooter("Made with Spark")
28
-
embed.setTimestamp()
29
-
embed.setColor(0xe1e818)
30
-
returnmessage.channel.send("",{embed})
17
+
constembed=newSpark.methods.RichEmbed();
18
+
embed.setTitle(`Information about ${client.user.username}`)
19
+
embed.setDescription(`Hello, I am ${client.user.tag}. I am owned and maintained by <@${client.config.ownerID}>, created with the Discord.JS framework known as **Spark**.\n\n`+
20
+
"Spark is a powerful modular framework that makes creating Discord bots easy.")
embed.addField("More Information:","Feel free to visit our [website](https://discordspark.com) or our discord [server](https://discord.gg/TezD2Zg) for more information about the Spark Framework.",false)
message.channel.send(`Hello, I am ${client.user.tag}. I am owned and maintained by ${owner.tag}, created with the Discord.JS framework known as **Spark**.\n\n`+
34
-
"Spark is a powerful modular framework that makes creating Discord bots easy.\n\n"+
35
-
`My prefix(es) are: ${prefixText}.\n`+
36
-
// "My ping is: {bot_latency}ms.\n"+
37
-
`I am running on version \`${Spark.version}\` of spark.\n\n`+
38
-
"__Statistics__\n"+
39
-
`I am currently in \`${client.guilds.size}\` servers.\n`+
40
-
`I am being used by \`${client.users.size}\` users.\n`+
41
-
`I am using \`${v}\` MB of memory.\n\n`+
42
-
"For more information about the **Spark** framework visit https://discord.gg/TezD2Zg or the website https://discordspark.com")
33
+
message.channel.send(`Hello, I am ${client.user.tag}. I am owned and maintained by ${owner.tag}, created with the Discord.JS framework known as **Spark**.\n\n`+
34
+
"Spark is a powerful modular framework that makes creating Discord bots easy.\n\n"+
35
+
`My prefix(es) are: ${prefixText}.\n`+
36
+
// "My ping is: {bot_latency}ms.\n"+
37
+
`I am running on version \`${Spark.version}\` of spark.\n\n`+
38
+
"__Statistics__\n"+
39
+
`I am currently in \`${client.guilds.size}\` servers.\n`+
40
+
`I am being used by \`${client.users.size}\` users.\n`+
41
+
`I am using \`${v}\` MB of memory.\n\n`+
42
+
"For more information about the **Spark** framework visit https://discord.gg/TezD2Zg or the website https://discordspark.com")
0 commit comments