mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 14:18:36 +02:00
Fix
This commit is contained in:
@@ -39,7 +39,7 @@ module.exports = class KinoCommand extends Command {
|
|||||||
const current = this.client.games.get(msg.channel.id);
|
const current = this.client.games.get(msg.channel.id);
|
||||||
if (current) return msg.reply(`Please wait until the current game of \`${current.name}\` is finished.`);
|
if (current) return msg.reply(`Please wait until the current game of \`${current.name}\` is finished.`);
|
||||||
this.client.games.set(msg.channel.id, { name: this.name });
|
this.client.games.set(msg.channel.id, { name: this.name });
|
||||||
const storyData = await this.generateStory(`${story}.txt`);
|
const storyData = await this.generateStory(story);
|
||||||
try {
|
try {
|
||||||
let i = 0;
|
let i = 0;
|
||||||
let end = false;
|
let end = false;
|
||||||
@@ -71,7 +71,7 @@ module.exports = class KinoCommand extends Command {
|
|||||||
|
|
||||||
async generateStory(file) {
|
async generateStory(file) {
|
||||||
const filename = stories.find(story => story.toLowerCase() === file);
|
const filename = stories.find(story => story.toLowerCase() === file);
|
||||||
const story = await readFile(path.join(__dirname, '..', '..', 'assets', 'txt', 'kino', filename), {
|
const story = await readFile(path.join(__dirname, '..', '..', 'assets', 'txt', 'kino', `${filename}.txt`), {
|
||||||
encoding: 'utf8'
|
encoding: 'utf8'
|
||||||
});
|
});
|
||||||
const chunks = [];
|
const chunks = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user