-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiscord.module.ts
More file actions
22 lines (21 loc) · 924 Bytes
/
discord.module.ts
File metadata and controls
22 lines (21 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { Module } from '@nestjs/common';
import { AwsModule } from './aws.module.js';
import { DiscordConfigService } from '../services/DiscordConfigService.js';
import { DiscordCommandRegistrar } from '../services/DiscordCommandRegistrar.js';
/**
* Discord configuration module.
*
* After the serverless migration this module no longer hosts a discord.js
* `Client` — the bot lives entirely in `InteractionsLambda` and
* `FollowupLambda`. The Nest server only needs to:
* - Persist DiscordConfig to DynamoDB and bot credentials to Secrets Manager
* (`DiscordConfigService`).
* - PUT slash commands into a guild via Discord's REST API when the operator
* clicks "Register commands" (`DiscordCommandRegistrar`).
*/
@Module({
imports: [AwsModule],
providers: [DiscordConfigService, DiscordCommandRegistrar],
exports: [DiscordConfigService, DiscordCommandRegistrar],
})
export class DiscordModule {}