forked from engineering/cloudservices
remove groupdel
parent
9400caaea9
commit
f6779f90ce
|
@ -6,6 +6,7 @@ import { Message, PrivateChannel, GroupChannel, Member, User } from 'eris';
|
||||||
import uuid from 'uuid/v4';
|
import uuid from 'uuid/v4';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
import os from 'os';
|
||||||
import { Client } from '..';
|
import { Client } from '..';
|
||||||
import { Command, RichEmbed } from '.';
|
import { Command, RichEmbed } from '.';
|
||||||
import { ModerationInterface, AccountInterface } from '../models';
|
import { ModerationInterface, AccountInterface } from '../models';
|
||||||
|
@ -155,7 +156,7 @@ export default class Util {
|
||||||
if (!account) throw new Error('Account not found');
|
if (!account) throw new Error('Account not found');
|
||||||
this.exec(`lock ${username}`);
|
this.exec(`lock ${username}`);
|
||||||
const tasks = [
|
const tasks = [
|
||||||
this.exec(`deluser ${username} --remove-home --backup-to /management/Archives && rm -rf -R ${account.homepath} && groupdel ${account.homepath.replace('/home/', '')}`),
|
this.exec(`deluser ${username} --remove-home --backup-to /management/Archives && rm -rf -R ${account.homepath}`),
|
||||||
this.client.db.Account.deleteOne({ username }),
|
this.client.db.Account.deleteOne({ username }),
|
||||||
];
|
];
|
||||||
this.client.removeGuildMemberRole('446067825673633794', account.userID, '546457886440685578', 'Cloud Account Deleted').catch();
|
this.client.removeGuildMemberRole('446067825673633794', account.userID, '546457886440685578', 'Cloud Account Deleted').catch();
|
||||||
|
|
Loading…
Reference in New Issue