Merge Kowalski with TwilightSparkle + fixes/changes
This commit is contained in:
parent
867a1f8a66
commit
3d125ffbf9
4 changed files with 27 additions and 24 deletions
|
@ -5,7 +5,7 @@ const spamwatchMiddleware = require('../spamwatch/Middleware.js')(isOnSpamWatch)
|
|||
const axios = require("axios");
|
||||
|
||||
module.exports = (bot) => {
|
||||
bot.command(["rpony", "randompony"], spamwatchMiddleware, async (ctx) => {
|
||||
bot.command(["rpony", "randompony", "mlpart"], spamwatchMiddleware, async (ctx) => {
|
||||
const Strings = getStrings(ctx.from.language_code);
|
||||
try {
|
||||
const response = await axios(Resources.randomPonyApi);
|
||||
|
@ -20,7 +20,7 @@ module.exports = (bot) => {
|
|||
}
|
||||
|
||||
ctx.replyWithPhoto(response.data.pony.representations.full, {
|
||||
caption: `${response.data.pony.sourceURL}\n\n${tags.length > 0 ? tags.join(', ') : 'N/A'}`,
|
||||
caption: `${response.data.pony.sourceURL}\n\n${tags.length > 0 ? tags.join(', ') : ''}`,
|
||||
parse_mode: 'Markdown',
|
||||
reply_to_message_id: ctx.message.message_id
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue