parent
							
								
									6cb710c6a6
								
							
						
					
					
						commit
						448b008884
					
				@ -1,6 +1,5 @@
 | 
				
			|||||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
 | 
					const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
 | 
				
			||||||
const { getUserRegistration, getBeatenGames, checkGameStorageId } = require('../../databaseHelperFunctions.js');
 | 
					const { getUserRegistration, getBeatenGames, checkGameStorageId } = require('../../databaseHelperFunctions.js');
 | 
				
			||||||
const { getGameJson } = require('../../igdbHelperFunctions.js');
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports = {
 | 
					module.exports = {
 | 
				
			||||||
    data: new SlashCommandBuilder()
 | 
					    data: new SlashCommandBuilder()
 | 
				
			||||||
@ -29,9 +28,7 @@ module.exports = {
 | 
				
			|||||||
            desc = desc.concat('__Total: ', beatenGamesDatabaseEntries.length, '/100__\n');
 | 
					            desc = desc.concat('__Total: ', beatenGamesDatabaseEntries.length, '/100__\n');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            for (let i = 0; i < beatenGamesDatabaseEntries.length; i++) {
 | 
					            for (let i = 0; i < beatenGamesDatabaseEntries.length; i++) {
 | 
				
			||||||
                const gameid = await checkGameStorageId(beatenGamesDatabaseEntries[i].gameId);
 | 
					                const game = await checkGameStorageId(beatenGamesDatabaseEntries[i].gameId);
 | 
				
			||||||
                const res = await getGameJson(`where id = ${ gameid.igdb_id }; fields *;`);
 | 
					 | 
				
			||||||
                const game = res[0];
 | 
					 | 
				
			||||||
                const date = beatenGamesDatabaseEntries[i].updatedAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/');
 | 
					                const date = beatenGamesDatabaseEntries[i].updatedAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/');
 | 
				
			||||||
                desc = desc.concat('**#', (i + 1), ' (', date, ')**: ', game.name, '\n');
 | 
					                desc = desc.concat('**#', (i + 1), ' (', date, ')**: ', game.name, '\n');
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,5 @@
 | 
				
			|||||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
 | 
					const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
 | 
				
			||||||
const { getUserRegistration, getPlayingGames, checkGameStorageId } = require('../../databaseHelperFunctions.js');
 | 
					const { getUserRegistration, getPlayingGames, checkGameStorageId } = require('../../databaseHelperFunctions.js');
 | 
				
			||||||
const { getGameJson } = require('../../igdbHelperFunctions.js');
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports = {
 | 
					module.exports = {
 | 
				
			||||||
    data: new SlashCommandBuilder()
 | 
					    data: new SlashCommandBuilder()
 | 
				
			||||||
@ -29,9 +28,7 @@ module.exports = {
 | 
				
			|||||||
            desc = desc.concat('__Total: ', databaseEntries.length, '__\n');
 | 
					            desc = desc.concat('__Total: ', databaseEntries.length, '__\n');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            for (let i = 0; i < databaseEntries.length; i++) {
 | 
					            for (let i = 0; i < databaseEntries.length; i++) {
 | 
				
			||||||
                const gameid = await checkGameStorageId(databaseEntries[i].gameId);
 | 
					                const game = await checkGameStorageId(databaseEntries[i].gameId);
 | 
				
			||||||
                const res = await getGameJson(`where id = ${ gameid.igdb_id }; fields *;`);
 | 
					 | 
				
			||||||
                const game = res[0];
 | 
					 | 
				
			||||||
                const date = databaseEntries[i].updatedAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/');
 | 
					                const date = databaseEntries[i].updatedAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/');
 | 
				
			||||||
                desc = desc.concat('**#', (i + 1), ' (', date, ')**: ', game.name, '\n');
 | 
					                desc = desc.concat('**#', (i + 1), ' (', date, ')**: ', game.name, '\n');
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,5 @@
 | 
				
			|||||||
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
 | 
					const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
 | 
				
			||||||
const { getUserRegistration, getPlanningGames, checkGameStorageId } = require('../../databaseHelperFunctions.js');
 | 
					const { getUserRegistration, getPlanningGames, checkGameStorageId } = require('../../databaseHelperFunctions.js');
 | 
				
			||||||
const { getGameJson } = require('../../igdbHelperFunctions.js');
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports = {
 | 
					module.exports = {
 | 
				
			||||||
    data: new SlashCommandBuilder()
 | 
					    data: new SlashCommandBuilder()
 | 
				
			||||||
@ -29,9 +28,7 @@ module.exports = {
 | 
				
			|||||||
            desc = desc.concat('__Total: ', databaseEntries.length, '__\n');
 | 
					            desc = desc.concat('__Total: ', databaseEntries.length, '__\n');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            for (let i = 0; i < databaseEntries.length; i++) {
 | 
					            for (let i = 0; i < databaseEntries.length; i++) {
 | 
				
			||||||
                const gameid = await checkGameStorageId(databaseEntries[i].gameId);
 | 
					                const game = await checkGameStorageId(databaseEntries[i].gameId);
 | 
				
			||||||
                const res = await getGameJson(`where id = ${ gameid.igdb_id }; fields *;`);
 | 
					 | 
				
			||||||
                const game = res[0];
 | 
					 | 
				
			||||||
                desc = desc.concat('**#', (i + 1), '** ', game.name, '\n');
 | 
					                desc = desc.concat('**#', (i + 1), '** ', game.name, '\n');
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user