mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
added updating of messages
This commit is contained in:
@@ -133,6 +133,21 @@ Internal.XHR.deleteMessage = function( token, channelID, messageID, callback ) {
|
||||
} );
|
||||
}
|
||||
|
||||
Internal.XHR.updateMessage = function( token, channelID, messageID, messageParameters, callback ){
|
||||
|
||||
request
|
||||
.patch(Endpoints.CHANNELS + "/" + channelID + "/messages/" + messageID)
|
||||
.set( "authorization", token )
|
||||
.send( messageParameters )
|
||||
.end(function(err, res){
|
||||
if ( err ) {
|
||||
callback( err );
|
||||
} else {
|
||||
callback( null, res.body );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Internal.XHR.getChannelLogs = function( token, channelID, amount, callback ) {
|
||||
request
|
||||
.get( Endpoints.CHANNELS + "/" + channelID + "/messages?limit=" + amount )
|
||||
|
||||
Reference in New Issue
Block a user