{"size": 1092, "ext": "js", "max_stars_repo_path": "index.js", "max_stars_repo_name": "A-User-s-Discord-Plugins/tweaks", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "index.js", "max_issues_repo_name": "A-User-s-Discord-Plugins/tweaks", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "index.js", "max_forks_repo_name": "A-User-s-Discord-Plugins/tweaks", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.3333333333, "max_line_length": 74, "alphanum_fraction": 0.6346153846}
import React from 'react';
import { Plugin } from '@vizality/entities';
import { patch, unpatchAll } from '@vizality/patcher';
import { getModule } from '@vizality/webpack';
import { assertObject, isEmptyObject } from '@vizality/util/Object';
import Settings from './Settings';
import Tweaks from './tweaks';

// const { getChannelId } = getModule('getChannelId', 'getVoiceChannelId')
// const { getChannel } = getModule("getChannel");

// const { Permissions } = getModule("Permissions")
// const UserPermissions = getModule("getHighestRole");

export default class Tweaks extends Plugin {
    start () {
        this.registerSettings(Settings)
        this.injectStyles("style.scss")

        Object.values(Tweaks).forEach(tweak => {
            assertObject(tweak)
            if (isEmptyObject(tweak)) return
            tweak.start?.(this.settings)
        })
    }

    stop () {
        unpatchAll()

        Object.values(Tweaks).forEach(tweak => {
            assertObject(tweak)
            if (isEmptyObject(tweak)) return
            tweak.stop?.(this.settings)
        })
    }
}