Skip to content

Commit 03f6e6c

Browse files
authored
Merge pull request #24 from carlos3g/code-refactor
[REFACTOR] Code refactor: third phase
2 parents 4bd6d57 + 7b4b353 commit 03f6e6c

31 files changed

+97
-97
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
node_modules/
2-
alice/src/auth/session.json
2+
**/session.json

alice/index.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

alice/scripts/bot.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

alice/scripts/commands.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

alice/scripts/links.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

alice/scripts/utils/parse.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

index.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const { Alice } = require('./src/Alice');
2+
const build = require('./src/build');
3+
4+
const path = new build.Path(__dirname);
5+
6+
const alice = new Alice([
7+
path.create('src/commands/bot', 'bot'),
8+
path.create('src/commands/coin', 'coin'),
9+
path.create('src/commands/commands', 'commands'),
10+
path.create('src/commands/cron', 'cron'),
11+
path.create('src/commands/dice', 'dice'),
12+
path.create('src/commands/doc', 'doc'),
13+
path.create('src/commands/doc', 'help'),
14+
path.create('src/commands/github', 'github'),
15+
path.create('src/commands/links', 'links'),
16+
path.create('src/commands/lyric', 'lyric'),
17+
path.create('src/commands/report', 'report'),
18+
path.create('src/commands/search', 'search'),
19+
path.create('src/commands/suggest', 'suggest'),
20+
path.create('src/commands/wiki', 'wiki'),
21+
]);
22+
23+
alice.initialize();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "alice",
33
"version": "0.0.8",
44
"description": "A multipurpose system based on Inside Heartz whatsapp bot",
5-
"main": "alice/index.js",
5+
"main": "index.js",
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/Coding-in-community/alice"

alice/src/index.js renamed to src/Alice.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const auth = require('./auth');
2-
const { Parse } = require('./parse');
2+
const { Parse } = require('./utils/Parse');
33
const build = require('./build');
44

55
const session = new auth.Session();
File renamed without changes.

0 commit comments

Comments
 (0)