1
1
mirror of https://gitlab.com/ceda_ei/Quadnite-Bot synced 2026-05-06 05:40:04 +02:00

Move text files to static/

This commit is contained in:
2021-09-27 23:53:33 +05:30
parent 7527fb6a1a
commit ce9611f079
8 changed files with 2 additions and 83 deletions

4
bot.js
View File

@@ -3,7 +3,7 @@ const { BOT_API_KEY, FEEDBACK_ID, UGOKI_ROOT } = process.env;
const fs = require("fs").promises;
const commands = require("./commands");
const axios = require("axios");
const roleplay = require("./roleplay.json");
const roleplay = require("./static/roleplay.json");
const bot = new Telegraf(BOT_API_KEY);
bot.catch((err) => console.log(err));
@@ -15,7 +15,7 @@ const data = [
"commands_list",
"words"
].map(file =>
fs.readFile(file + ".txt", "utf-8")
fs.readFile("static/" + file + ".txt", "utf-8")
.then(list =>
list.split("\n")));