mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-24 14:14:59 +05:00
Update courses.js
This commit is contained in:
parent
6e73e504a5
commit
771bede60f
1 changed files with 2 additions and 2 deletions
|
@ -43,14 +43,14 @@ class Courses extends BaseCommand {
|
||||||
|
|
||||||
const code = interaction.options.getString("code");
|
const code = interaction.options.getString("code");
|
||||||
|
|
||||||
const response = await fetch(`https://courses.beatrun.ru/api/info/${code}`).then(res => res.json());
|
const response = await fetch(`https://courses.jonnybro.ru/api/info/${code}`).then(res => res.json());
|
||||||
const course = response.data;
|
const course = response.data;
|
||||||
|
|
||||||
if (response.res === 401) return interaction.error("beatrun.ru/courses:NOT_FOUND", null, { ephemeral: true, edit: true });
|
if (response.res === 401) return interaction.error("beatrun.ru/courses:NOT_FOUND", null, { ephemeral: true, edit: true });
|
||||||
|
|
||||||
const embed = client.embed({
|
const embed = client.embed({
|
||||||
title: code,
|
title: code,
|
||||||
description: `[${interaction.translate("beatrun.ru/courses:DOWNLOAD")}](https://courses.beatrun.ru/${course.path})`,
|
description: `[${interaction.translate("beatrun.ru/courses:DOWNLOAD")}](https://courses.jonnybro.ru/${course.path})`,
|
||||||
thumbnail: course.mapimg,
|
thumbnail: course.mapimg,
|
||||||
url: `https://courses.beatrun.ru/?search=${code}`,
|
url: `https://courses.beatrun.ru/?search=${code}`,
|
||||||
fields: [
|
fields: [
|
||||||
|
|
Loading…
Reference in a new issue