diff --git a/scripts/wichtelbot/endpoint/definitions/message.ts b/scripts/wichtelbot/endpoint/definitions/message.ts index 7c6b847a3c68259525e78eeeef209208dea530af..a837e77eb38f007fa3ffa0a27a55797534c9587e 100644 --- a/scripts/wichtelbot/endpoint/definitions/message.ts +++ b/scripts/wichtelbot/endpoint/definitions/message.ts @@ -39,7 +39,7 @@ export default interface Message */ channel: Channel; /** - * The client that is instantiated the message. + * The client that has instantiated the message. */ client: Client; /** diff --git a/scripts/wichtelbot/endpoint/implementations/discord/discordClient.ts b/scripts/wichtelbot/endpoint/implementations/discord/discordClient.ts index 3325397f1fc530878367d943ee05af6c8879e342..f24b8324b724eb49d94ad1d081a03227bf4a7bfe 100644 --- a/scripts/wichtelbot/endpoint/implementations/discord/discordClient.ts +++ b/scripts/wichtelbot/endpoint/implementations/discord/discordClient.ts @@ -17,7 +17,7 @@ export class DiscordClient implements Client public getChannel (id: string): DiscordChannel { - const channel = this.client.channels.cache.get(id); + const channel = this.client.channels.cache.get(id); // TODO: Shouldn't this be fetched, too? if (channel === undefined) { diff --git a/scripts/wichtelbot/endpoint/implementations/discord/discordInteraction.ts b/scripts/wichtelbot/endpoint/implementations/discord/discordInteraction.ts index 2a197d1f25e5a1f7cf7ba5a48a6a45fb4bb6286d..98b2c6bb3520ce95b2cbe7a082dc3d012424ccd4 100644 --- a/scripts/wichtelbot/endpoint/implementations/discord/discordInteraction.ts +++ b/scripts/wichtelbot/endpoint/implementations/discord/discordInteraction.ts @@ -1,10 +1,10 @@ import * as Discord from 'discord.js'; import { Component, Message } from '../../definitions'; +import { DiscordUtils, SendMessage } from './discordUtils'; import Config from '../../../../utility/config'; import { DiscordChannel } from './discordChannel'; import { DiscordClient } from './discordClient'; import { DiscordUser } from './discordUser'; -import { DiscordUtils, SendMessage } from './discordUtils'; import { MessageWithParser } from '../../base/messageWithParser'; import Utils from '../../../../utility/utils'; diff --git a/scripts/wichtelbot/message/handlingDefinition.ts b/scripts/wichtelbot/message/handlingDefinition.ts index 277121179c86f45a3c4706869aab85b25eb92b4f..b5edf1f5c5a3ad0c96c7dae2ea74a66d96ce3f57 100644 --- a/scripts/wichtelbot/message/handlingDefinition.ts +++ b/scripts/wichtelbot/message/handlingDefinition.ts @@ -403,6 +403,7 @@ export default class HandlingDefinition handlerFunction: async (message: Message): Promise<void> => this.generalModule.firstContact(message) } ]; + public moderatorCommands: CommandDefinition[] = [ ]; diff --git a/scripts/wichtelbot/message/messageHandler.ts b/scripts/wichtelbot/message/messageHandler.ts index 868abb4fff3a31b55911d95f9009b763e22a470a..f8a6057dd73bd80aeb8fd3731c442e43aae69abb 100644 --- a/scripts/wichtelbot/message/messageHandler.ts +++ b/scripts/wichtelbot/message/messageHandler.ts @@ -22,6 +22,9 @@ enum CommandCallResult // TODO: Documentation export default class MessageHandler { + // TODO: Make everything private instead of protected (the same for every class where protected is not needed). + // TODO: Initialise all fields in the constructor only, not in the declaration (the same for every other class). + protected database: Database; protected generalModule: GeneralModule; diff --git a/scripts/wichtelbot/message/modules/informationModule.ts b/scripts/wichtelbot/message/modules/informationModule.ts index 3149345e0d75e6f20018d58b1cbfc11ff7eee901..f801c03ca3c9e91bec692f708611af6ff05a0f06 100644 --- a/scripts/wichtelbot/message/modules/informationModule.ts +++ b/scripts/wichtelbot/message/modules/informationModule.ts @@ -51,7 +51,7 @@ export default class InformationModule { // NOTE: Boolean values are only send if they are true. False is the default value. // This is needed to prevent sending "current values" the first time a contact registered. - // We could allow null for boolean values instead. + // TODO: We could allow null for boolean values instead. if (booleanValue) { await this.sendCurrentInformationValue(message, member, Localisation.translateBoolean(booleanValue)); @@ -310,5 +310,7 @@ export default class InformationModule const answer = text.process(member, parameters); await message.reply(answer); + + // TODO: Should we send an overview (like the Steckbrief) to the user? } }