Skip to content

Commit 7d6489e

Browse files
committed
chore(general-command): "Updated to use markdownReply instead of htmlReply, changed console.log in index.ts to log webhookInfo as an object, and reformatted the commands message in botMessages.json to use markdown syntax."
1 parent f0e88db commit 7d6489e

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/bot/commands/genearl/GeneralCommands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class GeneralCommands {
9595
static async commands(ctx: Context) {
9696
const reply = new BotReply(ctx);
9797
const { commands } = GeneralCommands.getMessage(ctx);
98-
await reply.htmlReply(commands);
98+
await reply.markdownReply(commands);
9999
}
100100
@ReplyToBot()
101101
@Catch({

src/bot/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class CopBot {
8383
logger.info(`Webhook server running on port ${port}`);
8484
await this._bot.api.setWebhook(webhookURL);
8585
const webhookInfo = await this._bot.api.getWebhookInfo();
86-
console.log(`Webhook Info: ${webhookInfo}`);
86+
console.log(`Webhook Info: `, webhookInfo);
8787
logger.info(`Webhook set: ${webhookInfo.url}`);
8888
});
8989
await startBot(mode);

src/utils/jsons/botMessages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"gorup": "Hello! What can I do?"
2626
},
2727
"commands": {
28-
"private": "<b>Private Mode Commands</b><br><br><b>/start</b>: Start interacting with the bot and receive a welcome message.<br><b>/help</b>: Get assistance and see the list of available commands.<br><b>/commands</b>: List all commands of the bot.<br><b>/date</b>: Get the current date and time.<br><b>/joke</b>: Get a random joke.<br><b>/viewsupportcontact</b>: View support contact details.<br><b>/botinfo</b>: Get information about the bot.<br><b>/shahin</b>: Trigger Shahin-specific functionality.<br><b>/aran</b>: Trigger Aran-specific functionality.<br><b>/rules</b>: View the group rules.<br><b>/codetime</b>: Says a random word sarcastically or offensively to you or people in the group.<br><b>/future</b>: Get insights about the future.<br><b>/groupinfo</b>: View information about the group.<br><b>/report</b>: Report an issue or a user.<br><b>/cancel</b>: Cancel the current report.<br><b>/link</b>: Generate or view group links.<br><b>/adminlist</b>: View the list of group admins.<br><b>/grant</b>: Grant admin privileges to a user.<br><b>/revoke</b>: Revoke admin privileges from a user.<br><b>/pin</b>: Pin a message in the group.<br><b>/unpin</b>: Unpin the pinned message.<br><b>/purge</b>: Delete a range of messages.<br><b>/welcome</b>: Returns the current group welcome message.<br><b>/approved</b>: Approve a user for special privileges.<br><b>/disapproved</b>: Remove approval for a user.<br><b>/approvedlist</b>: View the list of approved users.<br><b>/ban</b>: Ban a user from the group.<br><b>/unban</b>: Unban a previously banned user.<br><b>/warn</b>: Issue a warning to a user.<br><b>/rmwarn</b>: Remove a warning from a user.<br><b>/warns</b>: Check warnings for a user.<br><b>/warnslist</b>: View the list of all warnings.<br><b>/mute</b>: Mute a user in the group.<br><b>/unmute</b>: Unmute a previously muted user.<br><b>/blacklist</b>: Add a word or phrase to the blacklist.<br><b>/abl</b>: Add multiple words to the blacklist.<br><b>/rmbl</b>: Remove a word or phrase from the blacklist.<br><b>/clrbl</b>: Clear the blacklist.",
28+
"private": "Hello! Here's the full list of commands you can use in a private chat with the bot:\n\n### General Commands\n- **/start**: Start interacting with the bot.\n- **/help**: Get help and see the list of available commands.\n- **/commands**: List all commands of the bot.\n- **/date**: Get the current date and time.\n- **/joke**: Get a random joke.\n- **/viewsupportcontact**: View support contact details.\n- **/botinfo**: Get information about the bot.\n\n### Group Management Commands\n- **/rules**: View the group rules.\n- **/codetime**: Says a random word sarcastically or offensively to you or people in the group.\n- **/future**: Get insights about the future.\n- **/groupinfo**: View information about the group.\n- **/report**: Report an issue or a user.\n- **/cancel**: Cancel the current report.\n- **/link**: Generate or view group links.\n- **/adminlist**: View the list of group admins.\n- **/grant**: Grant admin privileges to a user.\n- **/revoke**: Revoke admin privileges from a user.\n- **/pin**: Pin a message in the group.\n- **/unpin**: Unpin the pinned message.\n- **/purge**: Delete a range of messages.\n- **/welcome**: Returns the current group welcome message.\n\n### Moderation Commands\n- **/approved**: Approve a user for special privileges.\n- **/disapproved**: Remove approval for a user.\n- **/approvedlist**: View the list of approved users.\n- **/ban**: Ban a user from the group.\n- **/unban**: Unban a previously banned user.\n- **/warn**: Issue a warning to a user.\n- **/rmwarn**: Remove a warning from a user.\n- **/warns**: Check warnings for a user.\n- **/warnslist**: View the list of all warnings.\n- **/mute**: Mute a user in the group.\n- **/unmute**: Unmute a previously muted user.\n\n### Blacklist Commands\n- **/blacklist**: Add a word or phrase to the blacklist.\n- **/abl**: Add multiple words to the blacklist.\n- **/rmbl**: Remove a word or phrase from the blacklist.\n- **/clrbl**: Clear the blacklist.\n\n### Shahin and Aran-Specific Commands\n- **/shahin**: Trigger Shahin-specific functionality.\n- **/aran**: Trigger Aran-specific functionality.\n\nFeel free to use any of the above commands, and let me know if you need any further assistance!",
2929
"public": "This command is only available in private chats. Please use it there."
3030
}
3131
}

0 commit comments

Comments
 (0)