Skip to content

Commit

Permalink
Changed all commands to use the EliteBGS API instead of local DB
Browse files Browse the repository at this point in the history
  • Loading branch information
SayakMukhopadhyay committed Jul 16, 2017
1 parent e248643 commit 6971b1a
Show file tree
Hide file tree
Showing 26 changed files with 229 additions and 1,081 deletions.
6 changes: 2 additions & 4 deletions src/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
import * as mongoose from 'mongoose';
import { DBSecrets } from '../secrets';

import { guildSchema, systemSchema, factionSchema } from './schemas';
import { guildSchema } from './schemas';

import { IModel, IGuildModel, ISystemModel, IFactionModel } from './models';
import { IModel, IGuildModel } from './models';

export class DB {
private options: mongoose.ConnectionOptions;
Expand Down Expand Up @@ -79,8 +79,6 @@ export class DB {

createModels(): void {
this.model.guild = mongoose.model<IGuildModel>("Guild", guildSchema);
this.model.system = mongoose.model<ISystemModel>("System", systemSchema);
this.model.faction = mongoose.model<IFactionModel>("Faction", factionSchema);
}
}

39 changes: 0 additions & 39 deletions src/db/interfaces/faction.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/db/interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@
*/

export * from './guild';
export * from './system';
export * from './faction';
47 changes: 0 additions & 47 deletions src/db/interfaces/system.ts

This file was deleted.

21 changes: 0 additions & 21 deletions src/db/models/faction.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/db/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@

export * from './models';
export * from './guild';
export * from './system';
export * from './faction';
4 changes: 1 addition & 3 deletions src/db/models/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
*/

import { Model } from 'mongoose';
import { IGuildModel, ISystemModel, IFactionModel } from './';
import { IGuildModel } from './';

export interface IModel {
guild: Model<IGuildModel>;
system: Model<ISystemModel>;
faction: Model<IFactionModel>;
}
21 changes: 0 additions & 21 deletions src/db/models/system.ts

This file was deleted.

50 changes: 0 additions & 50 deletions src/db/schemas/faction.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/db/schemas/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@
*/

export * from './guild';
export * from './system';
export * from './faction';
58 changes: 0 additions & 58 deletions src/db/schemas/system.ts

This file was deleted.

3 changes: 1 addition & 2 deletions src/modules/discord/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import * as discord from 'discord.js';
import { DiscordSecrets } from '../../secrets';
import { Responses } from './responseDict';
import { Hi, Help, MyGuild, BGSRole, AdminRoles, ForbiddenRoles, BGSChannel, MonitorSystems, MonitorFactions, SystemStatus, FactionStatus, BGSReport } from './commands';
import { Hi, Help, MyGuild, BGSRole, AdminRoles, ForbiddenRoles, BGSChannel, MonitorSystems, MonitorFactions, SystemStatus, FactionStatus } from './commands';

export class DiscordClient {
public client: discord.Client;
Expand Down Expand Up @@ -71,6 +71,5 @@ export class DiscordClient {
this.commandsMap.set("monitorfactions", MonitorFactions);
this.commandsMap.set("systemstatus", SystemStatus);
this.commandsMap.set("factionstatus", FactionStatus);
this.commandsMap.set("bgsreport", BGSReport);
}
}
Loading

0 comments on commit 6971b1a

Please sign in to comment.