Skip to content
This repository was archived by the owner on Jan 1, 2023. It is now read-only.

Commit bca77e0

Browse files
committedJan 16, 2021
Config File Reorganization
1 parent aee9b08 commit bca77e0

File tree

9 files changed

+107
-84
lines changed

9 files changed

+107
-84
lines changed
 

‎commands/team.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
const https = require('https');
22
const { MessageEmbed } = require('discord.js');
3-
const { api, options } = require('../config.json');
4-
const { team } = require('../templet.json');
3+
const filePath = require('../filePaths.json');
4+
const { api, options } = require(`../${filePath.config}`);
5+
const { team } = require(`../${filePath.response}`);
56
module.exports = {
67
name: 'team',
78
description: 'Information about the team provided.',

‎config.json

-10
This file was deleted.

‎configs/config.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"prefix" : "tba",
3+
"token" : "NzcyOTMyMTEyODgxOTQyNjE5.X6B3IA.flFWmkYNZTYAp4rvIZQYKH6vY1g",
4+
"api" : "https://www.thebluealliance.com/api/v3",
5+
"options" : {
6+
"headers" : {
7+
"X-TBA-Auth-Key" : "a0GVVMsyMlii325RLzZkcIehFZvOKnWwQ0EZ55A4D3QlnVrAnHzYAiMol56fhQnv"
8+
}
9+
}
10+
}

‎configs/response.json

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"status" : {
3+
"current_season": 0,
4+
"max_season": 0,
5+
"is_datafeed_down": true,
6+
"down_events": [
7+
"string"
8+
],
9+
"ios": {
10+
"min_app_version": 0,
11+
"latest_app_version": 0
12+
},
13+
"android": {
14+
"min_app_version": 0,
15+
"latest_app_version": 0
16+
}
17+
},
18+
"event" : {
19+
"key": "string",
20+
"name": "string",
21+
"event_code": "string",
22+
"event_type": 0,
23+
"district": {
24+
"abbreviation": "string",
25+
"display_name": "string",
26+
"key": "string",
27+
"year": 0
28+
},
29+
"city": "string",
30+
"state_prov": "string",
31+
"country": "string",
32+
"start_date": "2021-01-15",
33+
"end_date": "2021-01-15",
34+
"year": 0,
35+
"short_name": "string",
36+
"event_type_string": "string",
37+
"week": 0,
38+
"address": "string",
39+
"postal_code": "string",
40+
"gmaps_place_id": "string",
41+
"gmaps_url": "string",
42+
"lat": 0,
43+
"lng": 0,
44+
"location_name": "string",
45+
"timezone": "string",
46+
"website": "string",
47+
"first_event_id": "string",
48+
"first_event_code": "string",
49+
"webcasts": [
50+
{
51+
"type": "youtube",
52+
"channel": "string",
53+
"date": "string",
54+
"file": "string"
55+
}
56+
],
57+
"division_keys": [
58+
"string"
59+
],
60+
"parent_event_key": "string",
61+
"playoff_type": 0,
62+
"playoff_type_string": "string"
63+
},
64+
"team" : {
65+
"key": "string",
66+
"team_number": 0,
67+
"nickname": "string",
68+
"name": "string",
69+
"school_name": "string",
70+
"city": "string",
71+
"state_prov": "string",
72+
"country": "string",
73+
"address": "string",
74+
"postal_code": "string",
75+
"gmaps_place_id": "string",
76+
"gmaps_url": "string",
77+
"lat": 0,
78+
"lng": 0,
79+
"location_name": "string",
80+
"website": "string",
81+
"rookie_year": 0,
82+
"motto": "string",
83+
"home_championship": {}
84+
}
85+
}

‎events/message/message.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
const { prefix } = require('../../config.json');
1+
const filePath = require('../../filePaths.json');
2+
const { prefix } = require(`../../${filePath.config}`);
23
module.exports = (client, message) => {
34
if (!message.content.startsWith(prefix) || message.author.bot) return;
45

‎filePaths.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"config" : "configs/config.json",
3+
"response" : "configs/response.json"
4+
}

‎handlers/events_handler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ module.exports = (client) => {
88
client.on(event_name, event.bind(null, client));
99
}
1010
};
11-
['client', 'guild', 'message'].forEach(dirs => load_dir(dirs));
11+
['client', 'message'].forEach(dirs => load_dir(dirs));
1212
};

‎index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const Discord = require('discord.js');
2-
const { token } = require('./config.json');
2+
const filePath = require('./filePaths.json');
3+
const { token } = require(`./${filePath.config}`);
34

45
const client = new Discord.Client();
56
client.commands = new Discord.Collection();

‎templet.json

-69
This file was deleted.

0 commit comments

Comments
 (0)
This repository has been archived.