mirror of
https://github.com/abocn/TelegramBot.git
synced 2025-04-28 09:15:57 +00:00
fix: cat command (#41)
This commit is contained in:
parent
c7bd923b54
commit
867a1f8a66
@ -64,7 +64,7 @@ module.exports = (bot) => {
|
|||||||
const apiUrl = `${Resources.catApi}?json=true`;
|
const apiUrl = `${Resources.catApi}?json=true`;
|
||||||
const response = await axios.get(apiUrl);
|
const response = await axios.get(apiUrl);
|
||||||
const data = response.data;
|
const data = response.data;
|
||||||
const imageUrl = `${Resources.catApi}/${data._id}`;
|
const imageUrl = `${data.url}`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await ctx.replyWithPhoto(imageUrl, {
|
await ctx.replyWithPhoto(imageUrl, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user