@satorijs/protocol
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -18,2 +18,8 @@ import Element from '@satorijs/element'; | ||
} | ||
export interface TwoWayList<T> { | ||
data: T[]; | ||
prev?: string; | ||
next?: string; | ||
} | ||
export type Direction = 'before' | 'after' | 'around'; | ||
export interface Methods { | ||
@@ -24,3 +30,3 @@ createMessage(channelId: string, content: Element.Fragment, guildId?: string, options?: SendOptions): Promise<Message[]>; | ||
getMessage(channelId: string, messageId: string): Promise<Message>; | ||
getMessageList(channelId: string, next?: string): Promise<List<Message>>; | ||
getMessageList(channelId: string, next?: string, direction?: Direction): Promise<TwoWayList<Message>>; | ||
getMessageIter(channelId: string): AsyncIterable<Message>; | ||
@@ -27,0 +33,0 @@ editMessage(channelId: string, messageId: string, content: Element.Fragment): Promise<void>; |
{ | ||
"name": "@satorijs/protocol", | ||
"description": "Protocol types for Satori protocol", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"type": "module", | ||
@@ -41,5 +41,5 @@ "main": "lib/index.cjs", | ||
"dependencies": { | ||
"@satorijs/element": "^3.1.6", | ||
"cosmokit": "^1.5.2" | ||
"@satorijs/element": "^3.1.7", | ||
"cosmokit": "^1.6.2" | ||
} | ||
} |
@@ -37,3 +37,3 @@ import Element from '@satorijs/element' | ||
'message.get': Method('getMessage', ['channel_id', 'message_id']), | ||
'message.list': Method('getMessageList', ['channel_id', 'next']), | ||
'message.list': Method('getMessageList', ['channel_id', 'next', 'direction']), | ||
@@ -76,2 +76,10 @@ 'reaction.create': Method('createReaction', ['channel_id', 'message_id', 'emoji']), | ||
export interface TwoWayList<T> { | ||
data: T[] | ||
prev?: string | ||
next?: string | ||
} | ||
export type Direction = 'before' | 'after' | 'around' | ||
export interface Methods { | ||
@@ -83,3 +91,3 @@ // message | ||
getMessage(channelId: string, messageId: string): Promise<Message> | ||
getMessageList(channelId: string, next?: string): Promise<List<Message>> | ||
getMessageList(channelId: string, next?: string, direction?: Direction): Promise<TwoWayList<Message>> | ||
getMessageIter(channelId: string): AsyncIterable<Message> | ||
@@ -86,0 +94,0 @@ editMessage(channelId: string, messageId: string, content: Element.Fragment): Promise<void> |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36887
823
Updated@satorijs/element@^3.1.7
Updatedcosmokit@^1.6.2