mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
Add persist plugin
This commit is contained in:
parent
e7734c558c
commit
ad6afdfac1
10 changed files with 199 additions and 4 deletions
26
src/models/PersistedData.ts
Normal file
26
src/models/PersistedData.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import Model from "./Model";
|
||||
|
||||
export default class PersistedData extends Model {
|
||||
private _roles;
|
||||
private _isVoiceMuted;
|
||||
|
||||
public guild_id: string;
|
||||
public user_id: string;
|
||||
public nickname: string;
|
||||
|
||||
set roles(v) {
|
||||
this._roles = v ? v.split(",") : [];
|
||||
}
|
||||
|
||||
get roles() {
|
||||
return this._roles;
|
||||
}
|
||||
|
||||
set is_voice_muted(v) {
|
||||
this._isVoiceMuted = v === 1;
|
||||
}
|
||||
|
||||
get is_voice_muted() {
|
||||
return this._isVoiceMuted;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue