Chat upgraded for dice rolls and system messages
This commit is contained in:
25
src/app/chat/entry/entry.ts
Normal file
25
src/app/chat/entry/entry.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
export abstract class Entry {
|
||||
public timestamp;
|
||||
|
||||
protected constructor() {
|
||||
this.timestamp = new Date();
|
||||
}
|
||||
}
|
||||
|
||||
export class SystemMessage extends Entry {
|
||||
|
||||
constructor(public message: string,
|
||||
public severity: SeverityEnum) {
|
||||
super();
|
||||
}
|
||||
|
||||
public get type(): string {
|
||||
return 'system'
|
||||
}
|
||||
}
|
||||
|
||||
export enum SeverityEnum {
|
||||
info = 'info',
|
||||
warning = 'warning',
|
||||
error = 'error',
|
||||
}
|
||||
Reference in New Issue
Block a user