Browse Source

some reorerding of consts and functions

tarfeef101 4 years ago
parent
commit
3af0db9320
1 changed files with 13 additions and 23 deletions
  1. 13 23
      src/viki.js

+ 13 - 23
src/viki.js

@@ -1,14 +1,24 @@
 // Load up the discord.js library
 const Discord = require("discord.js");
-
 // Load up the shell command library
 var exec = require('child_process').exec;
-
 // Load up the queue library
 const Queue = require('./Queue.js');
+// Initialize the bot.
+const client = new Discord.Client();
+// this allows us to define a voice connection with global scope
+var connection;
+var dispatcher;
+// this is the playlist queue for music
+var playlist = new Queue();
+// Array of music classes users can call (artist, track, etc)
+const musicTypes = ['track', 'title', 'song', 'artist', 'album'];
+const musicTypesString = "track, title, song, artist, album";
+// Here we load the config.json file that contains our token and our prefix values.
+const config = require("./config.json");
 
-// Define a function to execute a command
 
+// Define a function to execute a command
 function execute(command, callback)
 {
   exec(command, function(error, stdout, stderr)
@@ -25,26 +35,6 @@ String.prototype.replaceAll = function(remove, replace)
 };
 
 
-// Initialize the bot.
-const client = new Discord.Client();
-
-// this allows us to define a voice connection with global scope
-var connection;
-var dispatcher;
-
-// this is the playlist queue for music
-var playlist = new Queue();
-
-// Array of music classes users can call (artist, track, etc)
-const musicTypes = ['track', 'title', 'song', 'artist', 'album'];
-const musicTypesString = "track, title, song, artist, album";
-
-// Here we load the config.json file that contains our token and our prefix values.
-const config = require("./config.json");
-// config.token contains the bot's token
-// config.prefix contains the message prefix.
-
-
 client.on("ready", () =>
 {
   // This event will run if the bot starts, and logs in, successfully.