mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-13 09:30:53 +00:00
20 lines
345 B
JavaScript
20 lines
345 B
JavaScript
|
import Module from 'utilities/module';
|
||
|
|
||
|
export class Addon extends Module {
|
||
|
constructor(...args) {
|
||
|
super(...args);
|
||
|
|
||
|
this.inject('i18n');
|
||
|
this.inject('settings');
|
||
|
}
|
||
|
|
||
|
static register(id, info) {
|
||
|
const ffz = FrankerFaceZ.get();
|
||
|
ffz.register(`addon.${id}`, this);
|
||
|
|
||
|
if ( info ) {
|
||
|
info.id = id;
|
||
|
ffz.addons.addAddon(info);
|
||
|
}
|
||
|
}
|
||
|
}
|