forked from embee/woomy
		
	Sync changes
This commit is contained in:
		
							parent
							
								
									db57128ebf
								
							
						
					
					
						commit
						5d42b0c602
					
				
					 4 changed files with 882 additions and 178 deletions
				
			
		
							
								
								
									
										16
									
								
								.eslintrc.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								.eslintrc.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,16 @@
 | 
				
			||||||
 | 
					module.exports = {
 | 
				
			||||||
 | 
					    "env": {
 | 
				
			||||||
 | 
					        "es6": true,
 | 
				
			||||||
 | 
					        "node": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "extends": "eslint:recommended",
 | 
				
			||||||
 | 
					    "globals": {
 | 
				
			||||||
 | 
					        "Atomics": "readonly",
 | 
				
			||||||
 | 
					        "SharedArrayBuffer": "readonly"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "parserOptions": {
 | 
				
			||||||
 | 
					        "ecmaVersion": 2018
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "rules": {
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
							
								
								
									
										8
									
								
								index.js
									
										
									
									
									
								
							
							
						
						
									
										8
									
								
								index.js
									
										
									
									
									
								
							| 
						 | 
					@ -10,6 +10,7 @@ if (Number(process.version.slice(1).split('.')[0]) < 12) {
 | 
				
			||||||
// Libraries
 | 
					// Libraries
 | 
				
			||||||
const fs = require('fs')
 | 
					const fs = require('fs')
 | 
				
			||||||
const colors = require('colors')
 | 
					const colors = require('colors')
 | 
				
			||||||
 | 
					const isDocker = require('is-docker')
 | 
				
			||||||
const Discord = require('discord.js')
 | 
					const Discord = require('discord.js')
 | 
				
			||||||
const client = new Discord.Client({ disabledEvents: ['TYPING_START'] })
 | 
					const client = new Discord.Client({ disabledEvents: ['TYPING_START'] })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -49,7 +50,8 @@ require('./modules/functions')(client)
 | 
				
			||||||
require('./modules/music')(client)
 | 
					require('./modules/music')(client)
 | 
				
			||||||
require('./modules/botlists')(client)
 | 
					require('./modules/botlists')(client)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (process.env.DEV_MODE) {
 | 
					// Logs into Discord as WoomyDev if a docker container is not detected. Delete this if self-hosting.
 | 
				
			||||||
 | 
					if (isDocker() === true) {
 | 
				
			||||||
  client.devmode = true
 | 
					  client.devmode = true
 | 
				
			||||||
  client.logger.warn('Running in development mode.')
 | 
					  client.logger.warn('Running in development mode.')
 | 
				
			||||||
} else {
 | 
					} else {
 | 
				
			||||||
| 
						 | 
					@ -68,7 +70,7 @@ const init = async () => {
 | 
				
			||||||
    if (err) {
 | 
					    if (err) {
 | 
				
			||||||
      client.logger.fatal('Failed to get files in commands directory: ' + err)
 | 
					      client.logger.fatal('Failed to get files in commands directory: ' + err)
 | 
				
			||||||
      process.exit()
 | 
					      process.exit()
 | 
				
			||||||
    };
 | 
					    }
 | 
				
			||||||
    client.logger.info(`Loading ${files.length} commands.`)
 | 
					    client.logger.info(`Loading ${files.length} commands.`)
 | 
				
			||||||
    files.forEach(file => {
 | 
					    files.forEach(file => {
 | 
				
			||||||
      if (!file.endsWith('.js')) {
 | 
					      if (!file.endsWith('.js')) {
 | 
				
			||||||
| 
						 | 
					@ -86,7 +88,7 @@ const init = async () => {
 | 
				
			||||||
    if (err) {
 | 
					    if (err) {
 | 
				
			||||||
      client.logger.fatal('Failed to get files in events directory: ' + err)
 | 
					      client.logger.fatal('Failed to get files in events directory: ' + err)
 | 
				
			||||||
      process.exit()
 | 
					      process.exit()
 | 
				
			||||||
    };
 | 
					    }
 | 
				
			||||||
    client.logger.info(`Loading ${files.length} events.`)
 | 
					    client.logger.info(`Loading ${files.length} events.`)
 | 
				
			||||||
    files.forEach(file => {
 | 
					    files.forEach(file => {
 | 
				
			||||||
      if (!file.endsWith('.js')) {
 | 
					      if (!file.endsWith('.js')) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										999
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										999
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
							
								
								
									
										37
									
								
								package.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								package.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,37 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  "name": "woomy",
 | 
				
			||||||
 | 
					  "version": "2.0.0",
 | 
				
			||||||
 | 
					  "description": "uwu",
 | 
				
			||||||
 | 
					  "main": "index.js",
 | 
				
			||||||
 | 
					  "dependencies": {
 | 
				
			||||||
 | 
					    "colors": "^1.4.0",
 | 
				
			||||||
 | 
					    "discord.js": "^12.1.1",
 | 
				
			||||||
 | 
					    "dotenv": "^8.2.0",
 | 
				
			||||||
 | 
					    "eslint-config-airbnb-base": "^14.1.0",
 | 
				
			||||||
 | 
					    "eslint-plugin-import": "^2.20.2",
 | 
				
			||||||
 | 
					    "get-youtube-id": "^1.0.1",
 | 
				
			||||||
 | 
					    "is-docker": "^2.0.0",
 | 
				
			||||||
 | 
					    "moment": "^2.24.0",
 | 
				
			||||||
 | 
					    "node-fetch": "^2.6.0",
 | 
				
			||||||
 | 
					    "prism-media": "^1.2.1",
 | 
				
			||||||
 | 
					    "tracer": "^1.0.2",
 | 
				
			||||||
 | 
					    "youtube-info": "^1.3.2",
 | 
				
			||||||
 | 
					    "ytdl-core-discord": "^1.1.0"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  "devDependencies": {
 | 
				
			||||||
 | 
					    "eslint": "^6.8.0"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  "scripts": {
 | 
				
			||||||
 | 
					    "test": "echo \"Error: no test specified\" && exit 1"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  "repository": {
 | 
				
			||||||
 | 
					    "type": "git",
 | 
				
			||||||
 | 
					    "url": "git+https://github.com/mudkipscience/woomy.git"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  "author": "mudkipscience",
 | 
				
			||||||
 | 
					  "license": "GPL-3.0",
 | 
				
			||||||
 | 
					  "bugs": {
 | 
				
			||||||
 | 
					    "url": "https://github.com/mudkipscience/woomy/issues"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  "homepage": "https://github.com/mudkipscience/woomy#readme"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue