Simple Node.js Bot RestfulAPI to get TikTok Live data and events (gifts, messages, likes, chat etc.) Bot can be managed via minecraft spigot plugin.
NOTE: TikTok Live Connector / McTiktok is not an any official API.
Type | Param Required | Endpoint | Description |
---|---|---|---|
Chat messages | Yes | /messages/{name} | Get live chat messages. Example: http://localhost:1234/messages/jordanmruczynski |
Gifts/donates | Yes | /gift/{name} | Get gifts. Example: http://localhost:1234/gift/jordanmruczynski |
Handle status | Yes, (stop and start) | /{status}/{name} | Connect and disconnect bot with stream. Examples: http://localhost:1234/start/jordanmruczynski and http://localhost:1234/stop/jordanmruczynski |
All (likes, follows etc.) | Yes | /get/{name} | Get all data, including likes. You are able to easily filter data for likes only for example. Example: http://localhost:1234/get/jordanmruczynski |
- Download plugin from latest release: McTiktok 2.1
- Download plugin dependency for placeholders GitHub PlaceholderAPI or SpigotMC PlaceholderAPI
- Put both in /plugins folder on your server (/home/yourServer/plugins)
- Restart your server (ps. always restart server, please never use /reload, because it has many negative aspects, for example, bad memory cleaning in maps)
- If everything is correct you should get plugin folder with 3 files in JSON Format: settings, gifts, chestItems.
- Configure each one as you need.
- Use /mctiktok command on server, and play :)! Have fun!
ID | Description |
---|---|
1 | Spawn zombie |
2 | Set cowweb under player |
3 | Give a 1x bread (food) for player |
4 | Spawn black skeletons |
5 | Spawn creeper |
6 | Give 1x enderpearl for player |
7 | Give 1x enchanted golden apple for player |
8 | Clear/reset player inventory |
9 | Give 1x totem of undying for player |
10 | Throw primed/fired tnt on player head |
11 | Freeze player on 7 seconds (can't jump/move) |
12 | Kill player |
13 | Gamemode creative for 10 seconds |
14 | Add one additional heart |
15 | Remove one heart |
16 | Spawn friendly iron golem |
Example configuration
{
"_comment": "Set actions here from 1 to 16 or your own command executed by console. Parameter {player} is replaced by player name.",
"5655": "say hi {player}",
"5211": 1,
"4412": 7
}
5655 = Rose ID Gift in my Country TikTok Gifts IDs
so if someone send a rose, console will execute say command.
5211 is a Coffe (not sure) so if someone will send a Coffe, action ID 1 will be executed (spawn zombie with gifter username)
4412... etc.
You can set commands and actions ids as you want :)
Example configuration
{
"_comment": "Bot host address and port, NOT your minecraft server. You need host JS bot yourself or buy access from the author. ",
"serverAddress": "localhost",
"serverPort": 8080
}
serverAddress and serverPort are a host address/port where nodejs app (bot, TikTok package) is hosted.
If you can't host it by yourself you can purchase access to my host on Discord: jordanmruczynski#7622
Example configuration
{
"items": [
{
"material": "DIAMOND_SWORD",
"amount": 1,
"damage": 0,
"enchantments": {
"DAMAGE_ALL": 2,
"DURABILITY": 1
},
"displayName": "Sword of Destruction"
},
{
"material": "IRON_HELMET",
"amount": 1,
"damage": 0,
"enchantments": {
"DAMAGE_ALL": 2,
"DURABILITY": 1
},
"displayName": "Sword of something idk what yet"
}
]
}
Items for magic chest, you need configure it by Spigot Type Materials and Enchants
For example SHARPNESS is DAMAGE_ALL
Please remember about JSON format, so the last value is without a comma as on the example.