add channel renderer + try to simplify adapter generics

This commit is contained in:
MapleLeaf
2021-12-27 19:22:21 -06:00
parent 6bfb1ab6de
commit 3682f67bfe
13 changed files with 143 additions and 43 deletions

View File

@@ -0,0 +1,13 @@
import type { Channel } from "./channel"
import type { Message, MessageOptions } from "./message"
import { Renderer } from "./renderer"
export class ChannelMessageRenderer extends Renderer {
constructor(private channel: Channel) {
super()
}
protected createMessage(options: MessageOptions): Promise<Message> {
return this.channel.send(options)
}
}