grammy-media-groups 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,13 +68,13 @@ bot.on("message", async (ctx) => {
|
|
|
68
68
|
if (group?.length === 1) {
|
|
69
69
|
await ctx.reply("Media group detected", {
|
|
70
70
|
reply_parameters: { message_id: ctx.msg.message_id },
|
|
71
|
-
reply_markup: new InlineKeyboard().text("
|
|
71
|
+
reply_markup: new InlineKeyboard().text("Copy", "copy"),
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
// Reply to an album message with /
|
|
77
|
-
bot.command("
|
|
76
|
+
// Reply to an album message with /copy to resend the full media group
|
|
77
|
+
bot.command("copy", async (ctx) => {
|
|
78
78
|
const group = await ctx.mediaGroups.getForReply();
|
|
79
79
|
if (group) {
|
|
80
80
|
await ctx.replyWithMediaGroup(
|
|
@@ -84,7 +84,7 @@ bot.command("album", async (ctx) => {
|
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
// Handle inline keyboard button to resend a media group
|
|
87
|
-
bot.
|
|
87
|
+
bot.callbackQuery("copy", async (ctx) => {
|
|
88
88
|
const group = await ctx.mediaGroups.getForReply();
|
|
89
89
|
if (group) {
|
|
90
90
|
await ctx.replyWithMediaGroup(
|