diff options
Diffstat (limited to 'src/models/Emoji.ts')
-rw-r--r-- | src/models/Emoji.ts | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/models/Emoji.ts b/src/models/Emoji.ts index 1facc252..bbed9323 100644 --- a/src/models/Emoji.ts +++ b/src/models/Emoji.ts @@ -1,12 +1,27 @@ -export interface Emoji { - allNamesString: string; // e.g. :thonk: +import { Schema, model, Types, Document } from "mongoose"; + +export interface Emoji extends Document { + id: bigint; animated: boolean; available: boolean; - guildId: bigint; - id: bigint; + guild_id: bigint; managed: boolean; name: string; require_colons: boolean; url: string; - roles: []; + roles: bigint[]; // roles this emoji is whitelisted to } + +export const EmojiSchema = new Schema({ + id: Types.Long, + animated: Boolean, + available: Boolean, + guild_id: Types.Long, + managed: Boolean, + name: String, + require_colons: Boolean, + url: String, + roles: [Types.Long], +}); + +export const EmojiModel = model<Emoji>("Emoji", EmojiSchema, "emojis"); |