forked from Galactic/galactic-bot
delete obsolete file
This commit is contained in:
parent
dff73f0a40
commit
7bf1254efe
@ -1,44 +0,0 @@
|
|||||||
/* eslint-disable no-undef */
|
|
||||||
require('dotenv').config();
|
|
||||||
|
|
||||||
const Migrator = require('../src/utilities/SettingsMigrator.js');
|
|
||||||
const sampleSettingsV2 = require('./sampleSettingsV2.json');
|
|
||||||
const { client } = require('../src/structure/DiscordClient.js');
|
|
||||||
//const client = new Client();
|
|
||||||
|
|
||||||
const dbs = {
|
|
||||||
'2': process.env.NODE_ENV === 'development' ? 'navybot' : 'galacticbot',
|
|
||||||
'3': 'newgbot'
|
|
||||||
};
|
|
||||||
|
|
||||||
const version = '2';
|
|
||||||
const { MONGODB_HOST, MONGODB_USERNAME, MONGODB_PASSWORD } = process.env;
|
|
||||||
const migrator = new Migrator(client, '264527028751958016', {
|
|
||||||
host: MONGODB_HOST,
|
|
||||||
username: MONGODB_USERNAME,
|
|
||||||
password: MONGODB_PASSWORD,
|
|
||||||
database: dbs[version], // Default to v3
|
|
||||||
version
|
|
||||||
});
|
|
||||||
|
|
||||||
const _test = async () => {
|
|
||||||
await client.ready();
|
|
||||||
await migrator.connect();
|
|
||||||
const { settings, webhook, permissions } = await migrator.migrate();
|
|
||||||
await migrator.end();
|
|
||||||
await client.destroy();
|
|
||||||
client.removeAllListeners();
|
|
||||||
|
|
||||||
console.log(settings);
|
|
||||||
console.log(permissions);
|
|
||||||
// expect(settings).toMatchObject({
|
|
||||||
// guildId: expect.any(String),
|
|
||||||
// mute: {
|
|
||||||
// role: expect.any(String),
|
|
||||||
// type: expect.any(Number)
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
};
|
|
||||||
_test();
|
|
||||||
// test('migration', _test);
|
|
Loading…
Reference in New Issue
Block a user