part 2
This commit is contained in:
		
							parent
							
								
									2286c9af3f
								
							
						
					
					
						commit
						6641778578
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		|  | @ -137,7 +137,7 @@ export class ChannelsManager extends BaseManager<ChannelPayload, Channel> { | |||
|   async editMessage( | ||||
|     channel: string | TextChannel, | ||||
|     message: Message | string, | ||||
|     text?: string, | ||||
|     text?: string | MessageOptions, | ||||
|     option?: MessageOptions | ||||
|   ): Promise<Message> { | ||||
|     const channelID = typeof channel === 'string' ? channel : channel.id | ||||
|  | @ -150,6 +150,12 @@ export class ChannelsManager extends BaseManager<ChannelPayload, Channel> { | |||
|       throw new Error('Client user has not initialized.') | ||||
|     } | ||||
| 
 | ||||
|     if (typeof text === 'object') { | ||||
|       if (typeof option === 'object') Object.assign(option, text) | ||||
|       else option = text | ||||
|       text = undefined | ||||
|     } | ||||
| 
 | ||||
|     const newMsg = await this.client.rest.api.channels[channelID].messages[ | ||||
|       typeof message === 'string' ? message : message.id | ||||
|     ].patch({ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue