reply instance deletion
This commit is contained in:
@@ -100,6 +100,9 @@ function createReacordMessage(message: Discord.Message): Message {
|
||||
components: message.components,
|
||||
})
|
||||
},
|
||||
delete: async () => {
|
||||
await message.delete()
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ export type ReacordConfig<InteractionInit> = {
|
||||
export type ReacordInstance = {
|
||||
render: (content: ReactNode) => void
|
||||
deactivate: () => void
|
||||
destroy: () => void
|
||||
}
|
||||
|
||||
export class Reacord<InteractionInit> {
|
||||
@@ -53,6 +54,10 @@ export class Reacord<InteractionInit> {
|
||||
deactivate: () => {
|
||||
this.deactivate(renderer)
|
||||
},
|
||||
destroy: () => {
|
||||
this.renderers = this.renderers.filter((it) => it !== renderer)
|
||||
renderer.destroy()
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user