Compare commits
No commits in common. "579bf67576c7e47744fe440d093dae4ec2aeed5e" and "63dbcba4d85f9cdb9935aa4f95de55cb63e7930a" have entirely different histories.
579bf67576
...
63dbcba4d8
|
@ -1,25 +1,14 @@
|
||||||
module.exports = (bot, feedback_id) => (ctx) => {
|
module.exports = (feedback_id) => (ctx) => {
|
||||||
|
|
||||||
const message = ctx.message.text.replace(/^[^ ]+/, "");
|
const message = ctx.message.text.replace(/^[^ ]+/, "");
|
||||||
if (message) {
|
if (message) {
|
||||||
|
|
||||||
const from = ctx.message.from;
|
|
||||||
let contactable = "The developer might contact you regarding your feedback.";
|
|
||||||
if (from.username) {
|
|
||||||
|
|
||||||
bot.telegram.sendMessage(feedback_id, `Feedback from: @${from.username}`);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
contactable = "The developer might not be able to contact you due to lack of your username.";
|
|
||||||
|
|
||||||
}
|
|
||||||
ctx.forwardMessage(feedback_id);
|
ctx.forwardMessage(feedback_id);
|
||||||
return `Thanks for the feedback! ${contactable}`;
|
return "Thanks for the feedback";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return "To send feedback type in /feedback followed by the feedback. Note that developers may contact you regarding the feedback.";
|
return "To send feedback type in /feedback followed by the feedback";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ module.exports = (bot, [ questions, kys, insults, commands_list, words, roleplay
|
||||||
"Markdown"}));
|
"Markdown"}));
|
||||||
bot.command("weebify", (ctx) => ctx.reply(weebify()(ctx)));
|
bot.command("weebify", (ctx) => ctx.reply(weebify()(ctx)));
|
||||||
bot.command("absurdify", (ctx) => ctx.reply(absurdify()(ctx)));
|
bot.command("absurdify", (ctx) => ctx.reply(absurdify()(ctx)));
|
||||||
bot.command("feedback", (ctx) => ctx.reply(feedback(bot, feedback_id)(ctx)));
|
bot.command("feedback", (ctx) => ctx.reply(feedback(feedback_id)(ctx)));
|
||||||
bot.command("wiki", (ctx) => media_wiki(axios,
|
bot.command("wiki", (ctx) => media_wiki(axios,
|
||||||
"https://en.wikipedia.org/w/api.php")(ctx).then(x => ctx.reply(x,
|
"https://en.wikipedia.org/w/api.php")(ctx).then(x => ctx.reply(x,
|
||||||
{parse_mode: "HTML"})));
|
{parse_mode: "HTML"})));
|
||||||
|
|
Loading…
Reference in New Issue