Update telegraf to 4.15

This commit is contained in:
2024-01-25 00:38:35 +05:30
parent c01ad5109d
commit 21871c9cd6
9 changed files with 181 additions and 60 deletions

View File

@@ -16,7 +16,7 @@ module.exports = () => (ctx) => {
} else {
if (ctx.message.reply_to_message)
if (ctx.message.reply_to_message && !ctx.message.reply_to_message.is_topic_message)
return absurdify(ctx.message.reply_to_message.text);
else
return "Need text to absurdify. Send /absurdify text or reply to a"

View File

@@ -37,7 +37,7 @@ module.exports = (words = []) => (ctx) => {
} else {
if (ctx.message.reply_to_message)
if (ctx.message.reply_to_message && !ctx.message.reply_to_message.is_topic_message)
return expand(words, ctx.message.reply_to_message.text);
else
return "Need text to expand. Send /expand text or reply to a "

View File

@@ -5,7 +5,7 @@ module.exports = () => (ctx) => {
text += `Message ID: \`${msg.message_id}\`\n`;
text += `Chat ID: \`${msg.chat.id}\`\n`;
text += `User ID: \`${msg.from.id}\`\n`;
if (msg.reply_to_message) {
if (ctx.message.reply_to_message && !ctx.message.reply_to_message.is_topic_message) {
const reply = msg.reply_to_message;
text += "\n*Reply to*\n";

View File

@@ -1,6 +1,6 @@
module.exports = (random, kys, default_text, bot_text, excluded_names) => (ctx) => {
if (ctx.message.reply_to_message) {
if (ctx.message.reply_to_message && !ctx.message.reply_to_message.is_topic_message) {
const { from } = ctx.message.reply_to_message;
const name = from.username ? "@" + from.username : from.first_name;

View File

@@ -14,7 +14,7 @@ module.exports = (forms, getGif) => (ctx) => {
.match(/^((@\w+(\s+|$))*)(.*)/);
const users = message[1].trim().split(" ").filter(i => i.length);
const rtm = ctx.message.reply_to_message;
if (rtm)
if (rtm && !rtm.is_topic_message)
users.push(rtm.from.username ? "@" + rtm.from.username
: rtm.from.first_name);
const reason = message[4];

View File

@@ -44,7 +44,7 @@ module.exports = () => (ctx) => {
} else {
if (ctx.message.reply_to_message)
if (ctx.message.reply_to_message && !ctx.message.reply_to_message.is_topic_message)
return weebify(ctx.message.reply_to_message.text);
else
return "Need text to weebify. Send /weebify text or reply to a "