Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuroXina committed Feb 6, 2024
1 parent 3d116f3 commit 26223cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 24 deletions.
23 changes: 8 additions & 15 deletions packages/bot/src/adaptor/discord/member-stats.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
import type { Client, Guild } from 'discord.js';

import type { Snowflake } from '../../model/id.js';
import type {
GuildMfaLevel,
GuildNsfwLevel,
GuildPremiumTier,
GuildRepository,

Check warning on line 7 in packages/bot/src/adaptor/discord/member-stats.ts

View check run for this annotation

Codecov / codecov/patch

packages/bot/src/adaptor/discord/member-stats.ts#L7

Added line #L7 was not covered by tests
GuildStats,
GuildStatsRepository,
GuildVerificationLevel
} from '../../service/command/guild-info.js';
import type { MemberStats } from '../../service/command/kokusei-chousa.js';
} from '../../model/guild.js';
import type { Snowflake } from '../../model/id.js';

Check warning on line 11 in packages/bot/src/adaptor/discord/member-stats.ts

View check run for this annotation

Codecov / codecov/patch

packages/bot/src/adaptor/discord/member-stats.ts#L10-L11

Added lines #L10 - L11 were not covered by tests
import type {
MemberRepository,

Check warning on line 13 in packages/bot/src/adaptor/discord/member-stats.ts

View check run for this annotation

Codecov / codecov/patch

packages/bot/src/adaptor/discord/member-stats.ts#L13

Added line #L13 was not covered by tests
MemberWithRole,
MembersWithRoleRepository
} from '../../service/command/role-rank.js';
import type {
UserStats,
UserStatsRepository
} from '../../service/command/user-info.js';
UserStats
} from '../../model/member.js';
import type { MemberStats } from '../../service/command/kokusei-chousa.js';

Check warning on line 17 in packages/bot/src/adaptor/discord/member-stats.ts

View check run for this annotation

Codecov / codecov/patch

packages/bot/src/adaptor/discord/member-stats.ts#L15-L17

Added lines #L15 - L17 were not covered by tests

const mappingMfaLevel: Record<Guild['mfaLevel'], GuildMfaLevel> = {
0: '2FAを要求しない',
Expand Down Expand Up @@ -50,11 +47,7 @@ const mappingVerificationLevel: Record<
};

export class DiscordMemberStats
implements
MemberStats,
MembersWithRoleRepository,
UserStatsRepository,
GuildStatsRepository
implements MemberStats, MemberRepository, GuildRepository

Check warning on line 50 in packages/bot/src/adaptor/discord/member-stats.ts

View check run for this annotation

Codecov / codecov/patch

packages/bot/src/adaptor/discord/member-stats.ts#L50

Added line #L50 was not covered by tests
{
constructor(
private readonly client: Client,
Expand Down
11 changes: 2 additions & 9 deletions packages/bot/src/adaptor/discord/role.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
import type { Client } from 'discord.js';

import type { Snowflake } from '../../model/id.js';
import type { RoleCreateManager } from '../../service/command/role-create.js';
import type {
RoleIcon,
RoleStats,
RoleStatsRepository
} from '../../service/command/role-info.js';
import type { RoleIcon, RoleRepository, RoleStats } from '../../model/role.js';

Check warning on line 4 in packages/bot/src/adaptor/discord/role.ts

View check run for this annotation

Codecov / codecov/patch

packages/bot/src/adaptor/discord/role.ts#L4

Added line #L4 was not covered by tests
import type { RoleManager } from '../../service/kawaemon-has-all-roles.js';

export class DiscordRoleManager
implements RoleManager, RoleCreateManager, RoleStatsRepository
{
export class DiscordRoleManager implements RoleManager, RoleRepository {

Check warning on line 7 in packages/bot/src/adaptor/discord/role.ts

View check run for this annotation

Codecov / codecov/patch

packages/bot/src/adaptor/discord/role.ts#L7

Added line #L7 was not covered by tests
constructor(
private readonly client: Client,
private readonly guildId: Snowflake
Expand Down

0 comments on commit 26223cc

Please sign in to comment.