~denisebitca/esmeralde

05a1df6399999ebf764f9ab669332f0fb3405d59 — Rafael Bitca 2 years ago c49c1cf
Attempting to fix an error on Linux systems
2 files changed, 3 insertions(+), 3 deletions(-)

M src/FollowupFunctions.ts
M src/index.ts
M src/FollowupFunctions.ts => src/FollowupFunctions.ts +3 -2
@@ 7,7 7,7 @@ import * as Discord from 'discord.js';
import fs from 'fs';
import path from 'path';
import { Group, userInfo, Crawler, SubGroup } from './Crawler';
import * as config from './config.json'
var config = JSON.parse(fs.readFileSync(path.join(__dirname, "config.json"), "utf8"));

export class FollowupFunctions{
    public static async followUpActionMenu1_edt(interaction: Discord.SelectMenuInteraction){


@@ 63,7 63,8 @@ export class FollowupFunctions{
            //@ts-ignore
            "userList": config.userList.length === 0 ? [newUser] : config.userList.concat([newUser])
        }
        await fs.promises.writeFile(path.join(__dirname, "config.json"), JSON.stringify(configCopy, null, 2));
        console.log(path.join(__dirname, "config.json"));
        await fs.promises.writeFile("./config.json", JSON.stringify(configCopy, null, 2), {encoding: "utf-8"});
        await fs.promises.rm(path.join(__dirname, interaction.user.id + ".json"));
        await interaction.update({content: "Ton emploi du temps a été enregistré !", embeds: [], components: []});
    }

M src/index.ts => src/index.ts +0 -1
@@ 10,7 10,6 @@ import * as Discord from 'discord.js';
import { SlashCommandBuilder } from '@discordjs/builders';
import { REST } from '@discordjs/rest';
import { Routes } from 'discord-api-types/v9';
const wait = require('util').promisify(setTimeout);

//other
import {FollowupFunctions} from './FollowupFunctions';