Compare commits

...
Author SHA1 Message Date
Parker Griffith 813e917429 Update src/index.js 2024-04-29 10:15:55 -04:00
Parker Griffith aa6216b6ef yaml funny 2024-04-29 10:12:22 -04:00
Parker Griffith 795093a705 Delete config.yml 2024-04-29 10:11:57 -04:00
Parker Griffith f6133ca7db yaml funny 2024-04-29 10:09:41 -04:00
2 changed files with 107 additions and 9 deletions
+89
View File
@@ -0,0 +1,89 @@
# i bet theres gonna be some whiny assholes complaining about this because config is .yml and not .js since most java bots use .yml and no other
# javascript bot uses .yml, all i got to say is go cry somewhere else about it you wont change my mind, you little shit,
# it looks cleaner than config.js - Parker2991
# FNFBoyfriendBot Config
Commands:
prefixes:
- '!'
colors:
discord:
error: "#ff0000"
embed: "#00ffff"
help:
pub_lickColor: "#00FFFF"
t_rustedColor: "dark_purple"
own_herColor: "dark_red"
error: "#FF0000"
Core:
JSON: ""
area:
start:
x: 0
y: 0
z: 0
end:
x: 15
y: 0
z: 15
validation:
discord:
roles:
trusted: "trusted"
owner: "owner"
channelId: "channel validation here"
trustedKey: "trusted key here"
ownerKey: "owner key here"
Discord:
enabled: false
invite: "https://discord.gg/GCKtG4erux"
commandPrefix: "!"
presence:
name: "amongus"
type: 4
status: "online"
console:
filelogging: false
prefix: "c."
bots :
- host: "localhost"
useChat: false
isKaboom: true
isCreayun: false
usernameGen: true
username: "FNFBoyfriendBot"
version: "1.20.2"
serverName: "localhost"
reconnectDelay: 6000
endcredits: false
Console:
enabled: true
ratelimit: 25
Core:
enabled: true
interval: 180000
discord:
channelId: ""
log: false
matrix:
roomId: ""
selfcare:
vanished: true
unmuted: true
prefix: true
cspy: true
tptoggle: true
skin: true
gmc: true
op: true
nickname: true
username: true
god: true
interval: 500
+18 -9
View File
@@ -2,16 +2,29 @@ const CommandError = require('./CommandModules/command_error.js');
const util = require("util");
const path = require('path');
const fs = require('fs');
if (!fs.existsSync('config.js')) {
const parseYaml = require('js-yaml')
/* if (!fs.existsSync('config.js')) {
console.log('Config not found creating config from default.js');
fs.copyFileSync(
path.join(__dirname, 'default.js'),
path.join(__dirname, 'default.yml'),
path.join(__dirname, 'config.js'),
);
}; */
if (!fs.existsSync('config.yml')) {
console.log('Config not found creating config from default.yml');
fs.copyFileSync(
path.join(__dirname, 'default.yml'),
path.join(__dirname, 'config.yml'),
);
};
const config = require(`../config.js`);
const createBot = require('./bot.js');
const fileExist = require("./util/file-exists");
// const config = require(`../config.js`);
try {
config = parseYaml.load(fs.readFileSync('config.yml', 'utf8'));
console.log(config)
} catch (e) {
console.log(e.toString())
}
const { createBot } = require('./bot.js');
const readline = require("readline");
const rl = readline.createInterface({
@@ -19,10 +32,6 @@ const rl = readline.createInterface({
output: process.stdout,
});
//const config = require('./config.js')
function load() {
require("dotenv").config();
const bots = [];