Skip to content

Commit 338777c

Browse files
committed
Review comments
1 parent 0025e61 commit 338777c

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
pretty-quick --staged
4+
npx pretty-quick --staged

src/log.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export async function hookLog(client: Client<true>) {
1717
(await client.guilds.fetch()).first()!.id,
1818
)!;
1919
const channel = (await guild.channels.fetch(logChannelId)) as TextChannel;
20-
console.log('Writing logs to', channel);
2120
let curLogText = '';
2221
let timeout: NodeJS.Timeout | null = null;
2322
const origLog = console.log;
@@ -30,6 +29,7 @@ export async function hookLog(client: Client<true>) {
3029
origError(...args);
3130
postLog(['[ERROR]', ...args]);
3231
};
32+
console.log('Writing logs to', channel);
3333
function argToString(arg: unknown) {
3434
if (typeof arg === 'string') return arg;
3535
return inspect(arg);

src/modules/help.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { sendWithMessageOwnership } from '../util/send';
66
function getCategoryHelp(cat: string, commands: Iterable<CommandRegistration>) {
77
const out: string[] = [];
88

9-
for (const cmd of commands) {
9+
for (const cmd of new Set(commands)) {
1010
if (!cmd.description) continue;
1111
const [cat2, description] = splitCategoryDescription(cmd.description);
1212
if (cat !== cat2) continue;

src/modules/helpthread.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,6 @@ export function helpThreadModule(bot: Bot) {
390390
bot.registerAdminCommand({
391391
aliases: ['htgh'],
392392
async listener(msg) {
393-
if (!bot.isMod(msg.member)) return;
394393
if (
395394
msg.channel.id !== howToGetHelpChannel &&
396395
msg.channel.id !== howToGiveHelpChannel

0 commit comments

Comments
 (0)