@@ -6,6 +6,7 @@ var dialogs = require("../../../dialogs.js");
66var sws = require ( "../sharedwebsocket.js" ) ;
77var audio = require ( "../../../audio.js" ) ;
88var confetti = require ( "./confetti.js" ) ;
9+ var clientSettings = require ( "../clientsettings.js" ) ;
910
1011var commandEffectsDiv = elements . getGPId ( "commandEffects" ) ;
1112
@@ -32,6 +33,9 @@ com.popupMessage = function (message) {
3233} ;
3334
3435com . macreJoke = function ( ) {
36+ if ( ! clientSettings . getSetting ( "JOKE_COMMANDS" ) ) {
37+ return ;
38+ }
3539 var img = document . createElement ( "img" ) ;
3640 img . src = "images/commands/macres-a.svg" ;
3741 img . style . top = "0" ;
@@ -57,6 +61,9 @@ com.macreJoke = function () {
5761} ;
5862
5963com . luigJoke = async function ( ) {
64+ if ( ! clientSettings . getSetting ( "JOKE_COMMANDS" ) ) {
65+ return ;
66+ }
6067 var video = document . createElement ( "video" ) ;
6168 video . src = "videos/luig.mp4" ;
6269 video . style . top = "0" ;
@@ -73,6 +80,9 @@ com.luigJoke = async function () {
7380} ;
7481
7582com . spin = function ( ) {
83+ if ( ! clientSettings . getSetting ( "JOKE_COMMANDS" ) ) {
84+ return ;
85+ }
7686 var rotatedeg = 0 ;
7787 var chat = document . body ;
7888 var int = setInterval ( ( ) => {
@@ -94,6 +104,9 @@ com.spin = function () {
94104} ;
95105
96106com . popcat = function ( time ) {
107+ if ( ! clientSettings . getSetting ( "JOKE_COMMANDS" ) ) {
108+ return ;
109+ }
97110 var ms = 1000 ;
98111 if ( Number ( time ) ) {
99112 ms = Number ( time ) * 1000 ;
@@ -134,6 +147,9 @@ com.kick = function () {
134147} ;
135148
136149com . shake = function ( intensity = 1 ) {
150+ if ( ! clientSettings . getSetting ( "JOKE_COMMANDS" ) ) {
151+ return ;
152+ }
137153 if ( isNaN ( intensity ) ) {
138154 intensity = 3 ;
139155 }
@@ -195,6 +211,9 @@ com.confetti = function () {
195211} ;
196212
197213com . funni = async function ( ) {
214+ if ( ! clientSettings . getSetting ( "JOKE_COMMANDS" ) ) {
215+ return ;
216+ }
198217 var img = document . createElement ( "img" ) ;
199218 img . src = "https://jasonglenevans.github.io/GvbvdxxChatEmojis/MSG_5.png" ;
200219 img . style . top = "0" ;
@@ -213,6 +232,9 @@ com.funni = async function () {
213232} ;
214233
215234com . doom = function ( ) {
235+ if ( ! clientSettings . getSetting ( "JOKE_COMMANDS" ) ) {
236+ return ;
237+ }
216238 let overlay = document . createElement ( "div" ) ;
217239 overlay . innerText = "⚠️ DOOM COUNTDOWN: 10 ⚠️" ;
218240 overlay . style . cssText = `position: fixed;top: 10px;left: 50%;transform: translateX(-50%);font-size: 2em;font-weight: bold;color: red;text-shadow: 2px 2px black;z-index: 9999;pointer-events: none;user-select: none;` ;
@@ -238,6 +260,9 @@ com.doom = function () {
238260} ;
239261
240262com . bandicam = function ( ) {
263+ if ( ! clientSettings . getSetting ( "JOKE_COMMANDS" ) ) {
264+ return ;
265+ }
241266 var overlay = document . createElement ( "span" ) ;
242267 overlay . innerText = "www.Bandicam.com" ;
243268 overlay . style . cssText = `position: fixed;
@@ -264,6 +289,9 @@ com.bandicam = function () {
264289} ;
265290
266291com . spooky = async function ( ) {
292+ if ( ! clientSettings . getSetting ( "JOKE_COMMANDS" ) ) {
293+ return ;
294+ }
267295 let overlay = document . createElement ( "div" ) ;
268296 overlay . style . position = "fixed" ;
269297 overlay . style . top = "0" ;
@@ -294,6 +322,9 @@ com.spooky = async function () {
294322} ;
295323
296324com . bsod = function ( ) {
325+ if ( ! clientSettings . getSetting ( "JOKE_COMMANDS" ) ) {
326+ return ;
327+ }
297328 var bsodStopped = false ;
298329
299330 var errors = [ ] ; // store all error icons
0 commit comments