import {Service} from '../service';

const baseUrl = 'https://discordapp.com/api/';

class Discord extends Service {
    buildRequest(builder) {
        let config = this.config;

        this.request = builder({
            oauth: {
                consumer_key: config.consumerKey,
                consumer_secret: config.consumerSecret,
                token: config.accessTokenKey,
                token_secret: config.accessTokenSecret
            }
        });
    }

    process() {
        let image = this.profile.image;
        
        if (!image) {
            return this._callback('No image provided!');
        }

        this.request.patch({
            url: baseUrl + 'users/{@me}'
        }, {
            avatar: image
        }, super._handleRes);
    }
}

export {Discord as Class};
@@ -616,24 +616,93 @@
 );%0A        %7D
+%0A        %0A        const data = %7B%0A            avatar: image%0A        %7D;
 %0A%0A        th
@@ -776,45 +776,12 @@
  %7D, 
-%7B%0A            avatar: image%0A        %7D
+data
 , su

Make object more readable