Skip to content

Commit 4802673

Browse files
committed
remove channel-based help system
1 parent 3564291 commit 4802673

File tree

6 files changed

+2
-784
lines changed

6 files changed

+2
-784
lines changed

.env.example

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,9 @@ DATABASE_URL="localhost:5432/tsc-bot"
1111
# are not given to all server members.
1212
TRUSTED_ROLE_ID=
1313

14-
# Channel ID to direct users toward for an explanation of the help system.
15-
ASK_HELP_CHANNEL=
16-
1714
RULES_CHANNEL=
1815

19-
ASK_CATEGORY=
20-
ONGOING_CATEGORY=
21-
DORMANT_CATEGORY=
22-
2316
HELP_CATEGORY=
2417

25-
ASK_COOLDOWN_ROLE=
26-
27-
CHANNEL_NAMES=list,help,channel,names,here,seperated,by,commas
28-
29-
# Following variables are in milliseconds
30-
DORMANT_CHANNEL_TIMEOUT=
31-
DORMANT_CHANNEL_LOOP=
32-
ONGOING_EMPTY_TIMEOUT=
18+
# Time in milliseconds before !helper can be run
3319
TIME_BEFORE_HELPER_PING=

src/db.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Connection, createConnection } from 'typeorm';
22
import { dbUrl } from './env';
33
import { RepUser } from './entities/RepUser';
44
import { RepGive } from './entities/RepGive';
5-
import { HelpUser } from './entities/HelpUser';
65
import { HelpThread } from './entities/HelpThread';
76
import { Snippet } from './entities/Snippet';
87

@@ -28,7 +27,7 @@ export async function getDB() {
2827
url: dbUrl,
2928
synchronize: true,
3029
logging: false,
31-
entities: [RepUser, RepGive, HelpUser, HelpThread, Snippet],
30+
entities: [RepUser, RepGive, HelpThread, Snippet],
3231
...extraOpts,
3332
});
3433
console.log('Connected to DB');

src/entities/HelpUser.ts

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

src/env.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,12 @@ export const autorole = process.env.AUTOROLE!.split(',').map(x => {
1616

1717
export const dbUrl = process.env.DATABASE_URL!;
1818

19-
export const categories = {
20-
ask: process.env.ASK_CATEGORY!,
21-
ongoing: process.env.ONGOING_CATEGORY!,
22-
dormant: process.env.DORMANT_CATEGORY!,
23-
};
24-
2519
export const helpCategory = process.env.HELP_CATEGORY!;
2620

27-
export const askCooldownRoleId = process.env.ASK_COOLDOWN_ROLE!;
28-
2921
export const trustedRoleId = process.env.TRUSTED_ROLE_ID!;
30-
export const askHelpChannelId = process.env.ASK_HELP_CHANNEL!;
3122

3223
export const rulesChannelId = process.env.RULES_CHANNEL!;
3324

34-
export const channelNames = process.env.CHANNEL_NAMES!.split(',');
35-
36-
export const dormantChannelTimeout = parseInt(
37-
process.env.DORMANT_CHANNEL_TIMEOUT!,
38-
);
39-
export const dormantChannelTimeoutHours =
40-
dormantChannelTimeout / 60 / 60 / 1000;
41-
export const dormantChannelLoop = parseInt(process.env.DORMANT_CHANNEL_LOOP!);
42-
43-
export const ongoingEmptyTimeout = parseInt(process.env.ONGOING_EMPTY_TIMEOUT!);
44-
45-
export const timeBeforeHelperPing = parseInt(
46-
process.env.TIME_BEFORE_HELPER_PING!,
47-
);
48-
4925
export const TS_BLUE = '#007ACC';
5026
export const GREEN = '#77b155';
5127
// Picked from Discord's "hourglass" emoji (in ⌛ | Occupied Help Channels)

src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { getDB } from './db';
55

66
import { AutoroleModule } from './modules/autorole';
77
import { EtcModule } from './modules/etc';
8-
import { HelpChanModule } from './modules/helpchan';
98
import { HelpThreadModule } from './modules/helpthread';
109
import { PlaygroundModule } from './modules/playground';
1110
import { RepModule } from './modules/rep';
@@ -37,7 +36,6 @@ const client = new CookiecordClient(
3736
for (const mod of [
3837
AutoroleModule,
3938
EtcModule,
40-
HelpChanModule,
4139
HelpThreadModule,
4240
PlaygroundModule,
4341
RepModule,

0 commit comments

Comments
 (0)