@@ -12,7 +12,7 @@ import {
12
12
} from '../types/endpoint.ts'
13
13
import { Collection } from '../utils/collection.ts'
14
14
import { Channel } from './channel.ts'
15
- import type { Embed } from './embed.ts'
15
+ import { Embed } from './embed.ts'
16
16
import { Emoji } from './emoji.ts'
17
17
import type { Member } from './member.ts'
18
18
import { Message } from './message.ts'
@@ -41,7 +41,6 @@ export class TextChannel extends Channel {
41
41
}
42
42
43
43
/**
44
- *
45
44
* @param content Text content of the Message to send.
46
45
* @param option Various other Message options.
47
46
* @param reply Reference to a Message object to reply-to.
@@ -51,11 +50,17 @@ export class TextChannel extends Channel {
51
50
option ?: AllMessageOptions ,
52
51
reply ?: Message
53
52
) : Promise < Message > {
54
- return this . client . channels . sendMessage (
55
- this ,
56
- content ,
57
- Object . assign ( option ?? { } , { reply } )
58
- )
53
+ if ( typeof content === 'object' ) {
54
+ option = content
55
+ content = undefined
56
+ }
57
+ if ( option instanceof Array ) {
58
+ option = { embeds : option }
59
+ }
60
+ if ( option instanceof Embed ) {
61
+ option = { embeds : [ option ] }
62
+ }
63
+ return this . client . channels . sendMessage ( this , content , { ...option , reply } )
59
64
}
60
65
61
66
/**
0 commit comments