@satorijs/core
Advanced tools
Comparing version 4.0.0 to 4.1.0
@@ -1,6 +0,5 @@ | ||
import * as cordis from 'cordis'; | ||
import { Message, SendOptions, Event, GuildMember, User, Login, Methods, Status, WebSocket } from '@satorijs/protocol'; | ||
import { Context, Logger, z, Service } from 'cordis'; | ||
import { Message, SendOptions, Event, GuildMember, User, Login, Methods, Response, Status, Upload, WebSocket } from '@satorijs/protocol'; | ||
import h from '@satorijs/element'; | ||
import { Dict, Awaitable } from 'cosmokit'; | ||
import { z } from 'cordis'; | ||
import { HTTP } from '@cordisjs/plugin-http'; | ||
@@ -80,2 +79,3 @@ export abstract class MessageEncoder<C extends Context = Context, B extends Bot<C> = Bot<C>> { | ||
static MessageEncoder?: new (bot: Bot, channelId: string, guildId?: string, options?: SendOptions) => MessageEncoder; | ||
self: this; | ||
user: User; | ||
@@ -85,9 +85,13 @@ isBot: boolean; | ||
platform: string; | ||
features: string[]; | ||
proxyUrls: string[]; | ||
adapter?: Adapter<C, this>; | ||
error?: Error; | ||
callbacks: Dict<Function>; | ||
logger: cordis.Logger; | ||
logger: Logger; | ||
[Context.current]: C; | ||
protected context: Context; | ||
protected _status: Status; | ||
constructor(ctx: C, config: T, platform?: string); | ||
registerUpload(path: string, callback: (path: string) => Promise<Response>): void; | ||
update(login: Login): void; | ||
@@ -109,2 +113,3 @@ dispose(): Promise<void>; | ||
sendPrivateMessage(userId: string, content: h.Fragment, guildId?: string, options?: SendOptions): Promise<string[]>; | ||
createUpload(...uploads: Upload[]): Promise<string[]>; | ||
supports(name: string, session?: Partial<C[typeof Context.session]>): Promise<boolean>; | ||
@@ -117,78 +122,2 @@ checkPermission(name: string, session: Partial<C[typeof Context.session]>): Promise<boolean>; | ||
} | ||
export type { Fragment, Render } from '@satorijs/element'; | ||
export { h, h as Element, h as segment, HTTP, HTTP as Quester }; | ||
export * from 'cordis'; | ||
export * from 'cosmokit'; | ||
export * as Universal from '@satorijs/protocol'; | ||
declare module '@cordisjs/plugin-http' { | ||
namespace HTTP { | ||
const Config: z<Config>; | ||
function createConfig(this: typeof HTTP, endpoint?: string | boolean): z<Config>; | ||
} | ||
} | ||
export type Component<S extends Session = Session> = h.Render<Awaitable<h.Fragment>, S>; | ||
export namespace Component { | ||
interface Options { | ||
session?: boolean; | ||
} | ||
} | ||
export type GetSession<C extends Context> = C[typeof Context.session]; | ||
export interface Events<C extends Context = Context> extends cordis.Events<C> { | ||
'internal/session'(session: GetSession<C>): void; | ||
'interaction/command'(session: GetSession<C>): void; | ||
'interaction/button'(session: GetSession<C>): void; | ||
'message'(session: GetSession<C>): void; | ||
'message-created'(session: GetSession<C>): void; | ||
'message-deleted'(session: GetSession<C>): void; | ||
'message-updated'(session: GetSession<C>): void; | ||
'message-pinned'(session: GetSession<C>): void; | ||
'message-unpinned'(session: GetSession<C>): void; | ||
'guild-added'(session: GetSession<C>): void; | ||
'guild-removed'(session: GetSession<C>): void; | ||
'guild-updated'(session: GetSession<C>): void; | ||
'guild-member-added'(session: GetSession<C>): void; | ||
'guild-member-removed'(session: GetSession<C>): void; | ||
'guild-member-updated'(session: GetSession<C>): void; | ||
'guild-role-created'(session: GetSession<C>): void; | ||
'guild-role-deleted'(session: GetSession<C>): void; | ||
'guild-role-updated'(session: GetSession<C>): void; | ||
'reaction-added'(session: GetSession<C>): void; | ||
'reaction-removed'(session: GetSession<C>): void; | ||
'login-added'(session: GetSession<C>): void; | ||
'login-removed'(session: GetSession<C>): void; | ||
'login-updated'(session: GetSession<C>): void; | ||
'friend-request'(session: GetSession<C>): void; | ||
'guild-request'(session: GetSession<C>): void; | ||
'guild-member-request'(session: GetSession<C>): void; | ||
'before-send'(session: GetSession<C>, options: SendOptions): Awaitable<void | boolean>; | ||
'send'(session: GetSession<C>): void; | ||
/** @deprecated use `login-added` instead */ | ||
'bot-added'(client: Bot<C>): void; | ||
/** @deprecated use `login-removed` instead */ | ||
'bot-removed'(client: Bot<C>): void; | ||
/** @deprecated use `login-updated` instead */ | ||
'bot-status-updated'(client: Bot<C>): void; | ||
'bot-connect'(client: Bot<C>): Awaitable<void>; | ||
'bot-disconnect'(client: Bot<C>): Awaitable<void>; | ||
} | ||
export interface Context { | ||
[Context.events]: Events<this>; | ||
[Context.session]: Session<this>; | ||
satori: Satori<this>; | ||
bots: Bot<this>[] & Dict<Bot<this>>; | ||
component(name: string, component: Component<GetSession<this>>, options?: Component.Options): () => void; | ||
} | ||
export class Context extends cordis.Context { | ||
static readonly session: unique symbol; | ||
static readonly Session: new (bot: Bot, event: Partial<Event>) => Session; | ||
constructor(config?: any); | ||
} | ||
export class Satori<C extends Context = Context> extends cordis.Service<unknown, C> { | ||
static [cordis.Service.provide]: string; | ||
static [cordis.Service.immediate]: boolean; | ||
constructor(ctx?: C); | ||
bots: Bot<C, any>[] & Dict<Bot<C, any>>; | ||
component(name: string, component: Component<C[typeof Context.session]>, options?: Component.Options): () => void; | ||
} | ||
export default Satori; | ||
export abstract class Adapter<C extends Context = Context, B extends Bot<C> = Bot<C>> { | ||
@@ -231,1 +160,92 @@ protected ctx: C; | ||
} | ||
export type { Fragment, Render } from '@satorijs/element'; | ||
export { h, h as Element, h as segment, HTTP, HTTP as Quester }; | ||
export * from 'cordis'; | ||
export * from 'cosmokit'; | ||
export * as Universal from '@satorijs/protocol'; | ||
declare module 'cordis' { | ||
interface Context { | ||
[Context.session]: Session<this>; | ||
satori: Satori<this>; | ||
bots: Bot<this>[] & Dict<Bot<this>>; | ||
component(name: string, component: Component<GetSession<this>>, options?: Component.Options): () => void; | ||
} | ||
namespace Context { | ||
const session: unique symbol; | ||
} | ||
interface Events<C> { | ||
'internal/session'(session: GetSession<C>): void; | ||
'interaction/command'(session: GetSession<C>): void; | ||
'interaction/button'(session: GetSession<C>): void; | ||
'message'(session: GetSession<C>): void; | ||
'message-created'(session: GetSession<C>): void; | ||
'message-deleted'(session: GetSession<C>): void; | ||
'message-updated'(session: GetSession<C>): void; | ||
'message-pinned'(session: GetSession<C>): void; | ||
'message-unpinned'(session: GetSession<C>): void; | ||
'guild-added'(session: GetSession<C>): void; | ||
'guild-removed'(session: GetSession<C>): void; | ||
'guild-updated'(session: GetSession<C>): void; | ||
'guild-member-added'(session: GetSession<C>): void; | ||
'guild-member-removed'(session: GetSession<C>): void; | ||
'guild-member-updated'(session: GetSession<C>): void; | ||
'guild-role-created'(session: GetSession<C>): void; | ||
'guild-role-deleted'(session: GetSession<C>): void; | ||
'guild-role-updated'(session: GetSession<C>): void; | ||
'reaction-added'(session: GetSession<C>): void; | ||
'reaction-removed'(session: GetSession<C>): void; | ||
'login-added'(session: GetSession<C>): void; | ||
'login-removed'(session: GetSession<C>): void; | ||
'login-updated'(session: GetSession<C>): void; | ||
'friend-request'(session: GetSession<C>): void; | ||
'guild-request'(session: GetSession<C>): void; | ||
'guild-member-request'(session: GetSession<C>): void; | ||
'before-send'(session: GetSession<C>, options: SendOptions): Awaitable<void | boolean>; | ||
'send'(session: GetSession<C>): void; | ||
/** @deprecated use `login-added` instead */ | ||
'bot-added'(client: Bot<C>): void; | ||
/** @deprecated use `login-removed` instead */ | ||
'bot-removed'(client: Bot<C>): void; | ||
/** @deprecated use `login-updated` instead */ | ||
'bot-status-updated'(client: Bot<C>): void; | ||
'bot-connect'(client: Bot<C>): Awaitable<void>; | ||
'bot-disconnect'(client: Bot<C>): Awaitable<void>; | ||
} | ||
} | ||
declare module '@cordisjs/plugin-http' { | ||
namespace HTTP { | ||
const Config: z<Config>; | ||
function createConfig(this: typeof HTTP, endpoint?: string | boolean): z<Config>; | ||
} | ||
} | ||
export type Component<S extends Session = Session> = h.Render<Awaitable<h.Fragment>, S>; | ||
export namespace Component { | ||
interface Options { | ||
session?: boolean; | ||
} | ||
} | ||
export type GetSession<C extends Context> = C[typeof Context.session]; | ||
type CordisEvents<C extends Context> = import('cordis').Events<C>; | ||
export interface Events<C extends Context = Context> extends CordisEvents<C> { | ||
} | ||
declare class SatoriContext extends Context { | ||
constructor(config?: any); | ||
} | ||
export { SatoriContext as Context }; | ||
export interface UploadRoute { | ||
path: string | string[] | (() => string | string[]); | ||
callback: (path: string) => Promise<Response>; | ||
} | ||
export class Satori<C extends Context = Context> extends Service<unknown, C> { | ||
static [Service.provide]: string; | ||
static [Service.immediate]: boolean; | ||
uid: string; | ||
_uploadRoutes: UploadRoute[]; | ||
_tempStore: Dict<Response>; | ||
constructor(ctx?: C); | ||
bots: Bot<C>[] & Dict<Bot<C>>; | ||
component(name: string, component: Component<C[typeof Context.session]>, options?: Component.Options): () => void; | ||
upload(path: UploadRoute['path'], callback: UploadRoute['callback'], proxyUrls?: UploadRoute['path'][]): () => void; | ||
download(path: string): Promise<Response>; | ||
} | ||
export default Satori; |
{ | ||
"name": "@satorijs/core", | ||
"description": "Core components of Satorijs", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"type": "module", | ||
@@ -59,11 +59,11 @@ "main": "lib/index.cjs", | ||
"peerDependencies": { | ||
"cordis": "^3.15.0" | ||
"cordis": "^3.15.3" | ||
}, | ||
"dependencies": { | ||
"@cordisjs/plugin-http": "^0.4.2", | ||
"@cordisjs/plugin-http": "^0.5.1", | ||
"@satorijs/element": "^3.1.7", | ||
"@satorijs/protocol": "^1.3.2", | ||
"cordis": "^3.15.0", | ||
"@satorijs/protocol": "^1.4.0", | ||
"cordis": "^3.15.3", | ||
"cosmokit": "^1.6.2" | ||
} | ||
} |
import { Awaitable, remove, Time } from 'cosmokit' | ||
import { Status, WebSocket } from '@satorijs/protocol' | ||
import { z } from 'cordis' | ||
import { Context } from '.' | ||
import { Context, z } from 'cordis' | ||
import { Bot } from './bot' | ||
@@ -6,0 +5,0 @@ |
import { clone, Dict, pick, remove } from 'cosmokit' | ||
import * as cordis from 'cordis' | ||
import { Context, Logger } from 'cordis' | ||
import h from '@satorijs/element' | ||
import { Context } from '.' | ||
import { Adapter } from './adapter' | ||
import { MessageEncoder } from './message' | ||
import { defineAccessor, Session } from './session' | ||
import { Event, List, Login, Methods, SendOptions, Status, User } from '@satorijs/protocol' | ||
import { Event, List, Login, Methods, Response, SendOptions, Status, Upload, User } from '@satorijs/protocol' | ||
const eventAliases = [ | ||
['message-created', 'message'], | ||
['guild-removed', 'guild-deleted'], | ||
['guild-member-removed', 'guild-member-deleted'], | ||
] | ||
@@ -24,2 +25,3 @@ | ||
public self = this | ||
public user = {} as User | ||
@@ -29,6 +31,9 @@ public isBot = true | ||
public platform: string | ||
public features: string[] | ||
public proxyUrls: string[] | ||
public adapter?: Adapter<C, this> | ||
public error?: Error | ||
public callbacks: Dict<Function> = {} | ||
public logger: cordis.Logger | ||
public logger: Logger | ||
public [Context.current]: C | ||
@@ -51,2 +56,7 @@ // Same as `this.ctx`, but with a more specific type. | ||
this.proxyUrls = [`upload://temp/${ctx.satori.uid}/`] | ||
this.features = Object.entries(Methods) | ||
.filter(([, value]) => this[value.name]) | ||
.map(([key]) => key) | ||
ctx.on('ready', async () => { | ||
@@ -68,2 +78,6 @@ await Promise.resolve() | ||
registerUpload(path: string, callback: (path: string) => Promise<Response>) { | ||
this.ctx.satori.upload(path, callback, this.proxyUrls) | ||
} | ||
update(login: Login) { | ||
@@ -185,2 +199,30 @@ // make sure `status` is the last property to be assigned | ||
async createUpload(...uploads: Upload[]): Promise<string[]> { | ||
const ids: string[] = [] | ||
for (const upload of uploads) { | ||
const id = Math.random().toString(36).slice(2) | ||
const headers = new Headers() | ||
headers.set('content-type', upload.type) | ||
if (upload.filename) { | ||
headers.set('content-disposition', `attachment; filename="${upload.filename}"`) | ||
} | ||
this.ctx.satori._tempStore[id] = { | ||
status: 200, | ||
data: upload.data, | ||
headers, | ||
} | ||
ids.push(id) | ||
} | ||
const timer = setTimeout(() => dispose(), 600000) | ||
const dispose = () => { | ||
_dispose() | ||
clearTimeout(timer) | ||
for (const id of ids) { | ||
delete this.ctx.satori._tempStore[id] | ||
} | ||
} | ||
const _dispose = this[Context.current].on('dispose', dispose) | ||
return ids.map(id => `upload://temp/${this.ctx.satori.uid}/${id}`) | ||
} | ||
async supports(name: string, session: Partial<C[typeof Context.session]> = {}) { | ||
@@ -197,3 +239,3 @@ return !!this[Methods[name]?.name] | ||
toJSON(): Login { | ||
return clone(pick(this, ['platform', 'selfId', 'status', 'user', 'hidden'])) | ||
return clone(pick(this, ['platform', 'selfId', 'status', 'user', 'hidden', 'features', 'proxyUrls'])) | ||
} | ||
@@ -228,2 +270,4 @@ | ||
list = await this[name + 'List'](...args, list?.next) | ||
// `bot.getMessageList()` returns messages in ascending order | ||
if (name === 'getMessage') list.data.reverse() | ||
} | ||
@@ -230,0 +274,0 @@ return { |
174
src/index.ts
@@ -1,11 +0,10 @@ | ||
import * as cordis from 'cordis' | ||
import { Awaitable, defineProperty, Dict } from 'cosmokit' | ||
import { Context, Logger, Service, z } from 'cordis' | ||
import { Awaitable, defineProperty, Dict, makeArray, remove } from 'cosmokit' | ||
import { Bot } from './bot' | ||
import { Session } from './session' | ||
import { z } from 'cordis' | ||
import { HTTP } from '@cordisjs/plugin-http' | ||
import { Event, SendOptions } from '@satorijs/protocol' | ||
import { Response, SendOptions } from '@satorijs/protocol' | ||
import h from '@satorijs/element' | ||
h.warn = new cordis.Logger('element').warn | ||
h.warn = new Logger('element').warn | ||
@@ -28,2 +27,54 @@ // do not remove the `type` modifier | ||
declare module 'cordis' { | ||
export interface Context { | ||
[Context.session]: Session<this> | ||
satori: Satori<this> | ||
bots: Bot<this>[] & Dict<Bot<this>> | ||
component(name: string, component: Component<GetSession<this>>, options?: Component.Options): () => void | ||
} | ||
export namespace Context { | ||
const session: unique symbol | ||
} | ||
interface Events<C> { | ||
'internal/session'(session: GetSession<C>): void | ||
'interaction/command'(session: GetSession<C>): void | ||
'interaction/button'(session: GetSession<C>): void | ||
'message'(session: GetSession<C>): void | ||
'message-created'(session: GetSession<C>): void | ||
'message-deleted'(session: GetSession<C>): void | ||
'message-updated'(session: GetSession<C>): void | ||
'message-pinned'(session: GetSession<C>): void | ||
'message-unpinned'(session: GetSession<C>): void | ||
'guild-added'(session: GetSession<C>): void | ||
'guild-removed'(session: GetSession<C>): void | ||
'guild-updated'(session: GetSession<C>): void | ||
'guild-member-added'(session: GetSession<C>): void | ||
'guild-member-removed'(session: GetSession<C>): void | ||
'guild-member-updated'(session: GetSession<C>): void | ||
'guild-role-created'(session: GetSession<C>): void | ||
'guild-role-deleted'(session: GetSession<C>): void | ||
'guild-role-updated'(session: GetSession<C>): void | ||
'reaction-added'(session: GetSession<C>): void | ||
'reaction-removed'(session: GetSession<C>): void | ||
'login-added'(session: GetSession<C>): void | ||
'login-removed'(session: GetSession<C>): void | ||
'login-updated'(session: GetSession<C>): void | ||
'friend-request'(session: GetSession<C>): void | ||
'guild-request'(session: GetSession<C>): void | ||
'guild-member-request'(session: GetSession<C>): void | ||
'before-send'(session: GetSession<C>, options: SendOptions): Awaitable<void | boolean> | ||
'send'(session: GetSession<C>): void | ||
/** @deprecated use `login-added` instead */ | ||
'bot-added'(client: Bot<C>): void | ||
/** @deprecated use `login-removed` instead */ | ||
'bot-removed'(client: Bot<C>): void | ||
/** @deprecated use `login-updated` instead */ | ||
'bot-status-updated'(client: Bot<C>): void | ||
'bot-connect'(client: Bot<C>): Awaitable<void> | ||
'bot-disconnect'(client: Bot<C>): Awaitable<void> | ||
} | ||
} | ||
declare module '@cordisjs/plugin-http' { | ||
@@ -62,54 +113,8 @@ namespace HTTP { | ||
export interface Events<C extends Context = Context> extends cordis.Events<C> { | ||
'internal/session'(session: GetSession<C>): void | ||
'interaction/command'(session: GetSession<C>): void | ||
'interaction/button'(session: GetSession<C>): void | ||
'message'(session: GetSession<C>): void | ||
'message-created'(session: GetSession<C>): void | ||
'message-deleted'(session: GetSession<C>): void | ||
'message-updated'(session: GetSession<C>): void | ||
'message-pinned'(session: GetSession<C>): void | ||
'message-unpinned'(session: GetSession<C>): void | ||
'guild-added'(session: GetSession<C>): void | ||
'guild-removed'(session: GetSession<C>): void | ||
'guild-updated'(session: GetSession<C>): void | ||
'guild-member-added'(session: GetSession<C>): void | ||
'guild-member-removed'(session: GetSession<C>): void | ||
'guild-member-updated'(session: GetSession<C>): void | ||
'guild-role-created'(session: GetSession<C>): void | ||
'guild-role-deleted'(session: GetSession<C>): void | ||
'guild-role-updated'(session: GetSession<C>): void | ||
'reaction-added'(session: GetSession<C>): void | ||
'reaction-removed'(session: GetSession<C>): void | ||
'login-added'(session: GetSession<C>): void | ||
'login-removed'(session: GetSession<C>): void | ||
'login-updated'(session: GetSession<C>): void | ||
'friend-request'(session: GetSession<C>): void | ||
'guild-request'(session: GetSession<C>): void | ||
'guild-member-request'(session: GetSession<C>): void | ||
'before-send'(session: GetSession<C>, options: SendOptions): Awaitable<void | boolean> | ||
'send'(session: GetSession<C>): void | ||
/** @deprecated use `login-added` instead */ | ||
'bot-added'(client: Bot<C>): void | ||
/** @deprecated use `login-removed` instead */ | ||
'bot-removed'(client: Bot<C>): void | ||
/** @deprecated use `login-updated` instead */ | ||
'bot-status-updated'(client: Bot<C>): void | ||
'bot-connect'(client: Bot<C>): Awaitable<void> | ||
'bot-disconnect'(client: Bot<C>): Awaitable<void> | ||
} | ||
type CordisEvents<C extends Context> = import('cordis').Events<C> | ||
export interface Context { | ||
[Context.events]: Events<this> | ||
[Context.session]: Session<this> | ||
satori: Satori<this> | ||
bots: Bot<this>[] & Dict<Bot<this>> | ||
component(name: string, component: Component<GetSession<this>>, options?: Component.Options): () => void | ||
} | ||
// FIXME remove in the future | ||
export interface Events<C extends Context = Context> extends CordisEvents<C> {} | ||
export class Context extends cordis.Context { | ||
static readonly session = Symbol('session') | ||
// remove generic type to loosen the constraint | ||
static readonly Session = Session as new (bot: Bot, event: Partial<Event>) => Session | ||
class SatoriContext extends Context { | ||
constructor(config?: any) { | ||
@@ -122,9 +127,40 @@ super(config) | ||
export class Satori<C extends Context = Context> extends cordis.Service<unknown, C> { | ||
static [cordis.Service.provide] = 'satori' | ||
static [cordis.Service.immediate] = true | ||
export { SatoriContext as Context } | ||
export interface UploadRoute { | ||
path: string | string[] | (() => string | string[]) | ||
callback: (path: string) => Promise<Response> | ||
} | ||
export class Satori<C extends Context = Context> extends Service<unknown, C> { | ||
static [Service.provide] = 'satori' | ||
static [Service.immediate] = true | ||
public uid = Math.random().toString(36).slice(2) | ||
_uploadRoutes: UploadRoute[] = [] | ||
_tempStore: Dict<Response> = Object.create(null) | ||
constructor(ctx?: C) { | ||
super(ctx) | ||
ctx.mixin('satori', ['bots', 'component']) | ||
this.upload(`/temp/${this.uid}/`, async (path) => { | ||
const id = path.split('/').pop() | ||
return this._tempStore[id] ?? { status: 404 } | ||
}) | ||
const self = this | ||
;(ctx as Context).on('http/file', async function (url, options) { | ||
if (!url.startsWith('upload://')) return | ||
const { status, data, headers } = await self.download(url.slice(9)) | ||
if (status >= 400) throw new Error(`Failed to fetch ${url}, status code: ${status}`) | ||
if (status >= 300) { | ||
const location = headers?.get('location') | ||
return this.file(location, options) | ||
} | ||
const type = headers?.get('content-type') | ||
const filename = headers?.get('content-disposition')?.split('filename=')[1] | ||
return { data, filename, type, mime: type } | ||
}) | ||
} | ||
@@ -160,4 +196,26 @@ | ||
} | ||
upload(path: UploadRoute['path'], callback: UploadRoute['callback'], proxyUrls: UploadRoute['path'][] = []) { | ||
return this[Context.current].effect(() => { | ||
const route: UploadRoute = { path, callback } | ||
this._uploadRoutes.push(route) | ||
proxyUrls.push(path) | ||
return () => { | ||
remove(this._uploadRoutes, route) | ||
remove(proxyUrls, path) | ||
} | ||
}) | ||
} | ||
async download(path: string) { | ||
for (const route of this._uploadRoutes) { | ||
const paths = makeArray(typeof route.path === 'function' ? route.path() : route.path) | ||
if (paths.some(prefix => path.startsWith(prefix))) { | ||
return route.callback(path) | ||
} | ||
} | ||
return { status: 404 } | ||
} | ||
} | ||
export default Satori |
@@ -0,5 +1,5 @@ | ||
import { Context } from 'cordis' | ||
import { Bot } from './bot' | ||
import { Message, SendOptions } from '@satorijs/protocol' | ||
import h from '@satorijs/element' | ||
import { Context } from '.' | ||
@@ -6,0 +6,0 @@ class AggregateError extends Error { |
@@ -0,5 +1,5 @@ | ||
import { Channel, Event, GuildMember, Message, User } from '@satorijs/protocol' | ||
import { defineProperty, isNullable } from 'cosmokit' | ||
import { Context } from '.' | ||
import { Context } from 'cordis' | ||
import { Bot } from './bot' | ||
import { Channel, Event, GuildMember, Message, User } from '@satorijs/protocol' | ||
import h from '@satorijs/element' | ||
@@ -6,0 +6,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
115681
2408
+ Added@cordisjs/plugin-http@0.5.3(transitive)
- Removed@cordisjs/plugin-http@0.4.2(transitive)
Updated@cordisjs/plugin-http@^0.5.1
Updated@satorijs/protocol@^1.4.0
Updatedcordis@^3.15.3