Sync!
This commit is contained in:
		@@ -402,4 +402,22 @@ export default bot => {
 | 
			
		||||
      e.reply(mock);
 | 
			
		||||
    }
 | 
			
		||||
  }));
 | 
			
		||||
 | 
			
		||||
  bot._trigger.set("sync", new bot.trigger({
 | 
			
		||||
    call: /^\.sync.*/i,
 | 
			
		||||
    set: "uwe",
 | 
			
		||||
    f: e => {
 | 
			
		||||
      const sync = e.args[0] || "80s90s";
 | 
			
		||||
      rp(`https://f0ck.space/sync.php?${sync}`, { json: true })
 | 
			
		||||
        .then(data => {
 | 
			
		||||
          if(data.err)
 | 
			
		||||
            e.reply("Channel nicht gefunden D:");
 | 
			
		||||
          else
 | 
			
		||||
            e.reply(`${data.name} @ https://sync.f0ck.space/r/${data.name}: ${data.user} Users, now playing: ${decodeURIComponent(data.title)}`);
 | 
			
		||||
        })
 | 
			
		||||
        .catch(err => {
 | 
			
		||||
          e.reply("Channel nicht gefunden D:");
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
  }));
 | 
			
		||||
};
 | 
			
		||||
		Reference in New Issue
	
	Block a user