-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👾 Ability to add labels when forwarding a message/post
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ import { createConversation } from 'https://deno.land/x/grammy_conversations@v1. | |
import { conversations } from 'https://deno.land/x/[email protected]/mod.ts' | ||
import { | ||
askApiKey, | ||
forwardPostLabels, | ||
saveBunchUrls, | ||
setDefaultLabel, | ||
updateToken, | ||
|
@@ -37,6 +38,7 @@ bot.use(createConversation(askApiKey)) | |
bot.use(createConversation(saveBunchUrls)) | ||
bot.use(createConversation(updateToken)) | ||
bot.use(createConversation(setDefaultLabel)) | ||
bot.use(createConversation(forwardPostLabels)) | ||
|
||
// Menu | ||
bot.use(cancelMenu) | ||
|
@@ -111,6 +113,10 @@ You can get new by following this guide [Getting an API token](https://docs.omni | |
await ctx.conversation.enter('updateToken') | ||
}) | ||
|
||
bot.on('message:text', async ctx => { | ||
await ctx.conversation.enter('forwardPostLabels') | ||
}) | ||
|
||
bot.start() | ||
|
||
bot.catch(err => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters