initial polls support (not exactly working)
This commit is contained in:
committed by
Cadence Ember
parent
2496f4c3b0
commit
e565342ac8
37
src/types.d.ts
vendored
37
src/types.d.ts
vendored
@@ -1,3 +1,5 @@
|
||||
import * as DiscordTypes from "discord-api-types/v10"
|
||||
|
||||
export type AppServiceRegistrationConfig = {
|
||||
id: string
|
||||
as_token: string
|
||||
@@ -81,6 +83,10 @@ export type WebhookAuthor = {
|
||||
id: string
|
||||
}
|
||||
|
||||
export type SendingPoll = DiscordTypes.RESTAPIPoll & {
|
||||
answers: (DiscordTypes.APIBasePollAnswer & {matrix_option: string})[]
|
||||
}
|
||||
|
||||
export type PkSystem = {
|
||||
id: string
|
||||
uuid: string
|
||||
@@ -269,6 +275,37 @@ export namespace Event {
|
||||
|
||||
export type Outer_M_Sticker = Outer<M_Sticker> & {type: "m.sticker"}
|
||||
|
||||
export type Org_Matrix_Msc3381_Poll_Start = {
|
||||
"org.matrix.msc3381.poll.start": {
|
||||
question: {
|
||||
"org.matrix.msc1767.text": string
|
||||
body: string
|
||||
msgtype: string
|
||||
},
|
||||
kind: string
|
||||
max_selections: number
|
||||
answers: {
|
||||
id: string
|
||||
"org.matrix.msc1767.text": string
|
||||
}[]
|
||||
"org.matrix.msc1767.text": string
|
||||
}
|
||||
}
|
||||
|
||||
export type Outer_Org_Matrix_Msc3381_Poll_Start = Outer<Org_Matrix_Msc3381_Poll_Start> & {type: "org.matrix.msc3381.poll.start"}
|
||||
|
||||
export type Org_Matrix_Msc3381_Poll_Response = {
|
||||
"org.matrix.msc3381.poll.response": {
|
||||
answers: string[]
|
||||
}
|
||||
"m.relates_to": {
|
||||
rel_type: string
|
||||
event_id: string
|
||||
}
|
||||
}
|
||||
|
||||
export type Outer_Org_Matrix_Msc3381_Poll_Response = Outer<Org_Matrix_Msc3381_Poll_Response> & {type: "org.matrix.msc3381.poll.response"}
|
||||
|
||||
export type M_Room_Member = {
|
||||
membership: string
|
||||
displayname?: string
|
||||
|
||||
Reference in New Issue
Block a user