Skip to content

Commit

Permalink
Aruna 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LoboMetalurgico committed Jul 5, 2020
1 parent b689550 commit 5223be2
Show file tree
Hide file tree
Showing 65 changed files with 3,789 additions and 2,087 deletions.
10 changes: 4 additions & 6 deletions _configs/index.js → .Configs/apiKeys.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable max-len */
/*
This File is part of ArunaBot
Copyright (C) LoboMetalurgico (and contributors) 2019-2020
Expand All @@ -16,10 +17,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/


//Dbots API Keys
module.exports = {
configs: require("./general.js"),
config: require("./general.js"),
links: require("./links"),
database: require("./mongoose.js"),
db: require("./mongoose.js")
};
}
10 changes: 4 additions & 6 deletions _configs/general.js → .Configs/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/


module.exports = {
prefix: "-",
token: "",
mongoose: "",
commands: "./Commands",
prefix: '-',
token: '',
mongoose: '',
sharding: {
totalShards: "auto",
totalShards: 'auto',
delay: 7500
}
};
25 changes: 25 additions & 0 deletions .Configs/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
This File is part of ArunaBot
Copyright (C) LoboMetalurgico (and contributors) 2019-2020
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

module.exports = {
configs: require('./general.js'),
config: require('./general.js'),
links: require('./links.js'),
database: require('./mongoose.js'),
db: require('./mongoose.js')
};
11 changes: 6 additions & 5 deletions _configs/links.js → .Configs/links.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable max-len */
/*
This File is part of ArunaBot
Copyright (C) LoboMetalurgico (and contributors) 2019-2020
Expand All @@ -17,9 +18,9 @@
*/

module.exports = {
supportServers: ["https://discord.gg/NqbBgEf"],
invites: ["https://discordapp.com/oauth2/authorize?client_id=593303574725787657&scope=bot&permissions=2146954751"],
donate: ["https://patreon.com/LoboMetalurgico"],
website: "",
trelloBoard: ""
supportServers: [''],
invites: [''],
donate: [''],
website: '',
trelloBoard: ''
};
49 changes: 27 additions & 22 deletions _configs/mongoose.js → .Configs/mongoose.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Expand All @@ -16,36 +16,36 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

var mongoose = require("mongoose");
const config = require('./general.js')
var mongoose = require('mongoose');
const config = require('./general.js');

var Schema = mongoose.Schema;
let url = config.mongoose;
const url = config.mongoose;
mongoose.connect(
url,
{ useNewUrlParser: true, useUnifiedTopology: true },
err => {
if (err) return console.log("(CLUSTER) => Erro\n", err);
console.log("(CLUSTER) => Conectado!");
if (err) return console.log('(CLUSTER) => Erro\n', err);
console.log('(CLUSTER) => Conectado!');
}
);

var User = new Schema({
_id: { type: String },
cmdCooldown: { type: String, default: "0" },
SUPER: { type: Boolean, default: false }
});

var Guild = new Schema({
_id: { type: String },
prefix: { type: String, default: config.prefix },
ticketCategoryID: { type: String, default: null },
ticketLogID: { type: String, default: null },
ticketSupportID: { type: String, default: null },
rankEnable: { type: Boolean, default: false },
ticketEnable: { type: Boolean, default: false },
autoRole: { type: Boolean, default: false },
autoRoleRole: { type: String, default: null }
autoRoleRole: { type: String, default: null },
isPremium: { type: Boolean, default: false },
isPartner: { type: Boolean, default: false }
});

var Rank = new Schema({
Expand All @@ -56,10 +56,6 @@ var Rank = new Schema({
guild: { type: String }
});

var Comando = new Schema({
_id: { type: String }
});

var Ticket = new Schema({
_id: { type: String },
owner: { type: String },
Expand All @@ -78,18 +74,27 @@ var Command = new Schema({
_id: { type: String },
name: { type: String },
public: { type: Boolean, default: false }
})
});

var System = new Schema({
_id: { type: Number },
maintenance: { type: Boolean, default: false},
date: { type: String, default: null },
time: { type: String, default: null }
});

var Commands = mongoose.model("Commands", Command);
var Support = mongoose.model("Suport", Support);
var Tickets = mongoose.model("Tickets", Ticket);
var Guilds = mongoose.model("Guilds", Guild);
var Users = mongoose.model("Users", User);
var Rank = mongoose.model("Rank", Rank);
var Commands = mongoose.model('Commands', Command);
var Supports = mongoose.model('Suport', Support);
var Tickets = mongoose.model('Tickets', Ticket);
var Systems = mongoose.model('System', System);
var Guilds = mongoose.model('Guilds', Guild);
var Users = mongoose.model('Users', User);
var Ranks = mongoose.model('Rank', Rank);

exports.Commands = Commands;
exports.Suport = Support;
exports.Tickets = Tickets;
exports.Suport = Supports;
exports.System = Systems;
exports.Guilds = Guilds;
exports.Users = Users;
exports.Rank = Rank;
exports.Rank = Ranks;
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.Config
Config/
79 changes: 79 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"env": {
"commonjs": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"rules": {
"array-bracket-spacing": [
"warn",
"never"
],
"computed-property-spacing": "warn",
"indent": [
"warn",
2
],
"keyword-spacing": [
"warn",
{
"before": true,
"after": true
}
],
"max-len": [
"warn",
{
"code": 160,
"ignoreComments": true,
"ignoreUrls": true
}
],
"no-cond-assign": [
2,
"except-parens"
],
"no-use-before-define": [
2,
{
"functions": false,
"classes": false,
"variables": false
}
],
"new-cap": 0,
"no-caller": 2,
"no-undef": 2,
"no-unused-vars": 1,
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
],
"no-console": "off",
"no-multi-spaces": "warn",
"prefer-const": [
"warn",
{
"destructuring": "all"
}
],
"quotes": [
"warn",
"single"
],
"semi": [
"warn",
"always"
],
"spaced-comment": "warn",
"space-infix-ops": "warn"
}
}
32 changes: 32 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: ESLint
on:
push:
paths:
- "src/**"
- ".eslintrc.*"
- ".github/workflows/eslint.yml"

jobs:
update:
name: ESLint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Node v12
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install PNPM
run: curl -L https://unpkg.com/@pnpm/self-installer | node
- name: Install dependencies
run: pnpm install
- name: Run ESLint
run: npm run eslint:fix
- name: Commit changes
uses: EndBug/add-and-commit@v4
with:
add: src
message: "chore(lint): Auto-fix linting errors"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 changes: 0 additions & 31 deletions .github/workflows/nodejs.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.env
configs/
Configs/
node_modules/
_main.js
.vscode/
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
Loading

0 comments on commit 5223be2

Please sign in to comment.