feat(contexts): add Channels and Guilds

This commit is contained in:
Divlo
2021-12-28 21:55:32 +01:00
parent d8667b12a0
commit 1c5f643554
19 changed files with 244 additions and 109 deletions

View File

@ -1,9 +1,7 @@
import { Type } from '@sinclair/typebox'
import { Type, Static } from '@sinclair/typebox'
import { date, id } from './utils'
export const types = [Type.Literal('text')]
export const channelSchema = {
id,
name: Type.String({ minLength: 1, maxLength: 20 }),
@ -11,3 +9,5 @@ export const channelSchema = {
updatedAt: date.updatedAt,
guildId: id
}
const channelObjectSchema = Type.Object(channelSchema)
export type Channel = Static<typeof channelObjectSchema>