Skip to content

Commit

Permalink
chore: update displayed cmds and descs
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Oct 3, 2024
1 parent 06c9ecd commit fd13f11
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { chatAction } from "@grammyjs/auto-chat-action";
import { Composer } from "grammy";
import { GrammyContext } from "../../../helpers/grammy-context";
import { isAdmin } from "../../../filters/is-admin";
import { logHandle } from "../../../helpers/logging";
import { GrammyContext } from "../../helpers/grammy-context";
import { isAdmin } from "../../filters/is-admin";
import { logHandle } from "../../helpers/logging";

const composer = new Composer<GrammyContext>();

Expand Down
27 changes: 24 additions & 3 deletions src/bot/handlers/commands/setcommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,38 @@ import { GrammyContext } from "../../helpers/grammy-context";
function getPrivateChatCommands(): BotCommand[] {
return [
{
command: "start",
description: "start-command-description",
command: "botid",
description: "Get the bot's ID",
},
{
command: "myid",
description: "Get your user ID",
},
{
command: "register",
description: "Pair your GitHub account for use with private notifications and more",
},
{
command: "subscribe",
description: "Subscribe to notifications",
},
{
command: "unsubscribe",
description: "Unsubscribe from selected notifications",
},

];
}

function getPrivateChatAdminCommands(): BotCommand[] {
return [
{
command: "setcommands",
description: "setcommands-command-description",
description: "Set the bot's commands",
},
{
command: "setwebhook",
description: "Set the webhook URL",
},
];
}
Expand Down
2 changes: 1 addition & 1 deletion src/bot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { userIdFeature } from "./features/commands/private-chat/user-id";
import { chatIdFeature } from "./features/commands/shared/chat-id";
import { botIdFeature } from "./features/commands/private-chat/bot-id";
import { banCommand } from "./features/commands/groups/ban";
import { setWebhookFeature } from "./features/commands/private-chat/set-webhook";
import { setWebhookFeature } from "./features/admin/set-webhook";
import { Logger } from "../utils/logger";
import { createContextConstructor, GrammyContext, SessionData } from "./helpers/grammy-context";
import { errorHandler } from "./handlers/error";
Expand Down

0 comments on commit fd13f11

Please sign in to comment.