add channel renderer + try to simplify adapter generics
This commit is contained in:
13
library/internal/channel-message-renderer.ts
Normal file
13
library/internal/channel-message-renderer.ts
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user