@@ -111,12 +111,12 @@ class MessageManager extends CachedManager {
111111 return this . _add ( data , cache ) ;
112112 }
113113
114- async _fetchMany ( options = { } ) {
114+ async _fetchMany ( { cache , ... apiOptions } = { } ) {
115115 const data = await this . client . rest . get ( Routes . channelMessages ( this . channel . id ) , {
116- query : makeURLSearchParams ( options ) ,
116+ query : makeURLSearchParams ( apiOptions ) ,
117117 } ) ;
118118
119- return data . reduce ( ( _data , message ) => _data . set ( message . id , this . _add ( message , options . cache ) ) , new Collection ( ) ) ;
119+ return data . reduce ( ( _data , message ) => _data . set ( message . id , this . _add ( message , cache ) ) , new Collection ( ) ) ;
120120 }
121121
122122 /**
@@ -158,11 +158,11 @@ class MessageManager extends CachedManager {
158158 * .then(messages => console.log(`Received ${messages.items.length} messages`))
159159 * .catch(console.error);
160160 */
161- async fetchPins ( options = { } ) {
161+ async fetchPins ( { cache , ... apiOptions } = { } ) {
162162 const data = await this . client . rest . get ( Routes . channelMessagesPins ( this . channel . id ) , {
163163 query : makeURLSearchParams ( {
164- ...options ,
165- before : options . before && new Date ( options . before ) . toISOString ( ) ,
164+ ...apiOptions ,
165+ before : apiOptions . before && new Date ( apiOptions . before ) . toISOString ( ) ,
166166 } ) ,
167167 } ) ;
168168
@@ -172,7 +172,7 @@ class MessageManager extends CachedManager {
172172 get pinnedAt ( ) {
173173 return new Date ( this . pinnedTimestamp ) ;
174174 } ,
175- message : this . _add ( item . message , options . cache ) ,
175+ message : this . _add ( item . message , cache ) ,
176176 } ) ) ,
177177 hasMore : data . has_more ,
178178 } ;
0 commit comments