initial commit
This commit is contained in:
22
models/AutoroleMsg.ts
Normal file
22
models/AutoroleMsg.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import {Schema, Types, model} from 'mongoose';
|
||||
|
||||
import {Guild} from './Guild';
|
||||
|
||||
export interface AutoroleMsg{
|
||||
_id: Types.ObjectId;
|
||||
guild: Guild;
|
||||
messageId: string;
|
||||
emoji: string;
|
||||
roleId: string;
|
||||
}
|
||||
|
||||
const autoroleMsgSchema = new Schema<AutoroleMsg>({
|
||||
guild: {type: Schema.Types.ObjectId, required: true},
|
||||
messageId: {type: String, required: true},
|
||||
emoji: {type: String, required: false},
|
||||
roleId: {type: String, required: true},
|
||||
});
|
||||
|
||||
export const autoroleMsgModel = model<AutoroleMsg>(
|
||||
'autoroleMsgModel', autoroleMsgSchema
|
||||
);
|
||||
Reference in New Issue
Block a user