Adds eslint and linted & improved routing for interactions
This commit is contained in:
parent
83209f642c
commit
441715675c
35 changed files with 2091 additions and 463 deletions
|
|
@ -2,7 +2,7 @@ import {Repository} from "./Repository";
|
|||
import {GroupModel} from "../Models/GroupModel";
|
||||
import Groups, {DBGroup} from "../Database/tables/Groups";
|
||||
import {DatabaseConnection} from "../Database/DatabaseConnection";
|
||||
import {CacheType, CacheTypeReducer, Guild, GuildMember, GuildMemberRoleManager} from "discord.js";
|
||||
import {GuildMember} from "discord.js";
|
||||
import {Nullable} from "../types/Nullable";
|
||||
import {PlaydateRepository} from "./PlaydateRepository";
|
||||
import {Container} from "../Container/Container";
|
||||
|
|
@ -33,7 +33,7 @@ export class GroupRepository extends Repository<GroupModel, DBGroup> {
|
|||
}
|
||||
|
||||
public findGroupsByRoles(server: string, roleIds: string[]): GroupModel[] {
|
||||
const template = roleIds.map(roleId => '?').join(',');
|
||||
const template = roleIds.map(_roleId => '?').join(',');
|
||||
|
||||
const dbResult = this.database.fetchAll<number[], DBGroup>(`
|
||||
SELECT * FROM groups WHERE server = ? AND role IN (${template})
|
||||
|
|
@ -64,7 +64,6 @@ export class GroupRepository extends Repository<GroupModel, DBGroup> {
|
|||
public deleteGroup(group: GroupModel): void {
|
||||
this.delete(group.id);
|
||||
|
||||
debugger
|
||||
const repo = Container.get<PlaydateRepository>(PlaydateRepository.name);
|
||||
const playdates = repo.findFromGroup(group, true)
|
||||
playdates.forEach((playdate) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue