mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-21 14:04:38 +02:00
Fix frinkiac
This commit is contained in:
@@ -34,7 +34,7 @@ module.exports = class FrinkiacCommand extends Command {
|
|||||||
if (!search) return msg.say('Could not find any results.');
|
if (!search) return msg.say('Could not find any results.');
|
||||||
const data = await this.fetchCaption(search.Episode, search.Timestamp);
|
const data = await this.fetchCaption(search.Episode, search.Timestamp);
|
||||||
const time = moment.duration(data.Frame.Timestamp).format();
|
const time = moment.duration(data.Frame.Timestamp).format();
|
||||||
const caption = data.Subtitles.slice(1, 3).map(sub => sub.Content).join(' ').split(' ');
|
const caption = data.Subtitles.map(sub => sub.Content).join(' ').split(' ');
|
||||||
let url = `https://frinkiac.com/meme/${data.Frame.Episode}/${data.Frame.Timestamp}.jpg`;
|
let url = `https://frinkiac.com/meme/${data.Frame.Episode}/${data.Frame.Timestamp}.jpg`;
|
||||||
const wrapped = [''];
|
const wrapped = [''];
|
||||||
let currentLine = 0;
|
let currentLine = 0;
|
||||||
@@ -46,7 +46,7 @@ module.exports = class FrinkiacCommand extends Command {
|
|||||||
currentLine++;
|
currentLine++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
url += `?b64lines=${base64(wrapped.join('\n'))}`;
|
url += `?b64lines=${base64(wrapped.join('\n')).replace(/\//g, '_')}`;
|
||||||
const seasonEpisode = `S${data.Episode.Season}E${data.Episode.EpisodeNumber}`;
|
const seasonEpisode = `S${data.Episode.Season}E${data.Episode.EpisodeNumber}`;
|
||||||
return msg.say(
|
return msg.say(
|
||||||
`This is from **${seasonEpisode} ("${data.Episode.Title}") @ ${time}**.`,
|
`This is from **${seasonEpisode} ("${data.Episode.Title}") @ ${time}**.`,
|
||||||
|
|||||||
Reference in New Issue
Block a user