Example Commands _ Kicklet.app
Example Commands _ Kicklet.app
Kicklet.app
SearchK
Main Navigation HomeDocumentation
Appearance
Menu
Return to top
Sidebar Navigation
Documentation
Introduction
Default Commands
JavaScript / Template
Example Commands
On this page
Example Commands
Here are some example commands that you can directly copy or modify slightly for your own
stream.
go
Your Emoji of the Day is:{{randItem "🌟" "🚀" "💎" "🌈"}}
Kill-counter
Every time the command is executed, the counter is incremented by 1, and in the chat, it shows
the new value.
go
The Streamer has {{kicklet.CounterAdd "killcounter" 1}} kills.
It is displayed in the chat how many players are currently online on the Minecraft server.
go
There are currently {{minecraft.Players "hypixel.net"}} players on
Hypixel.net!
Random Joke
A random joke is fetched from the "official-joke API" and displayed in the chat.
go
{{$response := http.GetJson "https://official-joke-
api.appspot.com/random_joke"}}
{{$response.setup}} - {{$response.punchline}}
Points Drop/Rain
A command that allows you or your moderators, depending on the permission settings, to
distribute a certain number of points to all currently active chatters at that moment. Usage:
!drop (amount)
go
{{if eq (len args) 1}}
{{ $points := index args 0 }}
{{if and (isInt $points) (ge (parseInt $points) 1)}}
{{ $parsedPoints := parseInt $points }}
{{ $parsedPoints }} points have been distributed to
{{kicklet.AddPointsViewers $parsedPoints}} chatters!
{{else}}
Please enter a valid point value.
{{end}}
{{else}}
Use: !drop (amount)
{{end}}
Roulette
This command is a comprehensive roulette system in which you can bet points on numbers 1-36
and on RED or BLACK.
go
{{define "winMsg"}}
Congratulations, you have won {{mul .Points .Multiplier}} points! 💰
{{end}}
{{define "syntaxError"}}
Invalid syntax. Use: !roulette (1-36 | BLACK | RED) (Points)
{{end}}
{{define "notAnIntError"}}
Please enter a valid point value.
{{end}}
{{define "loseMsg"}}
Unfortunately, you lost. Try again!
{{end}}
{{define "notEnoughPoints"}}
You cannot bet more points than you have.
{{end}}
{{define "numberMsg"}}
🎰 The ball lands on {{.Number}} {{.Emoji}}
{{end}}
{{define "newPointsMsg"}}
You have now {{.NewPoints}} Points.
{{end}}
{{else}}
{{ template "syntaxError" }}
{{end}}
js
<template>
{{/* Author: Kicklet */}}
{{define "slotLoseMsg"}}
Better luck next time! 🍀
{{end}}
{{define "slotSyntaxError"}}
Invalid syntax. Use: !slot (Points)
{{end}}
{{define "notEnoughPoints"}}
You do not have enough Points!
{{end}}
{{define "slotMachineResult"}}
🎰 ➜ {{script.Call "getFormattedSlot"}}
{{end}}
</template>
<script>
const username = $event.getSender();
const args = $event.getCommandArgs();
const items = ['🍇', '🍌', '🍒'];
const winMultiplier = 5;
let result;
let slots = [];
let winPoints = 0;
function getFormattedSlot() {
return `[${slots[0]}|${slots[1]}|${slots[2]}]`;
}
function randItem() {
return items[Math.floor(Math.random() * items.length)];
}
function isInt(value) {
return !isNaN(value) && parseInt(Number(value)) == value &&
!isNaN(parseInt(value, 10));
}
Pager
Previous pageHow to use JavaScript
Next pageUsage of API Token