Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const config = require('./../config.js').config;
- const request = require('./../modules/api-request');
- exports.execute = async (client, message, args) => {
- let username = args[1];
- let data = {
- discord: message.author.id
- };
- try {
- if(!username) {
- throw new ("Error");
- }
- // La magie du "await" fait que ton asynchrone se comporte en synchrone (mais ne bloque pas le thread bien sur)
- result = await request.post(config.yaml.api.url+'/account/discord/link/'+username, data)
- }
- catch(error) {
- console.log(error);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement