Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/princevora/minecraft-server-motd

MSM Shows minecraft server MOTD and server infos
https://github.com/princevora/minecraft-server-motd

Last synced: 5 days ago
JSON representation

MSM Shows minecraft server MOTD and server infos

Awesome Lists containing this project

README

        

# minecraft-server-motd
MSM Shows minecraft server MOTD and server infos

# Install the Package
```
npm i minecraft-server-motd
```

# Commands
```
npm i
```

or

```
npm install
```

# Before you start your project you will need to compile the typescript
```
npm run build
```

## After the successfull build Run the following command
```
npm run start
```

## Usage
```js
// Import the protocol module from index (root)
import protocol from "./";

// Create a variable
const host = "play.hypixel.net";
const port = 25565;

protocol(host, port)
.then((response) => {
// Your logic..
console.log(response);

/**
*
* Response will be generated something like below
*
* {
isOnline: true,
favicon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAtt....,
motd: {
raw: '§f §aHypixel Network §c[1.8-1.20]§f\n' +
' §5§lNEW PTL GAME: §d§lSHEEP WARS §7| §b§lSB 0.20.2',
html: ' Hypixel Network [1.8-1.20]\n' +
'
NEW PTL GAME: SHEEP WARS | SB 0.20.2
'
},
maxPlayers: 200000,
playerCount: 30191
}
*
*/
})
.catch((error) => {
// Your logic here
console.error(error);
})
```