Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function serverStatus(){
- const getServerInfo = async (server) => {
- try {
- const response = await fetch(`https://api.mcsrvstat.us/1/szesciennakraina.pl`)
- const json = await response.json()
- server.players = {
- now: json.players.online,
- max: json.players.max
- }
- let plrs = "Graczy online:" + now + "/" + max
- client.user.setActivity('${plrs}')
- } catch (err) {
- client.user.setActivity('Nie dziaĆa.')
- }
- return server
- }
- };
Add Comment
Please, Sign In to add comment