mirror of
https://github.com/danbulant/Shasha
synced 2026-05-22 05:28:46 +00:00
23 lines
No EOL
562 B
JavaScript
23 lines
No EOL
562 B
JavaScript
'use strict';
|
|
|
|
const { timestampAt } = require("../debug");
|
|
let a;
|
|
|
|
module.exports = {
|
|
description: "Toggle debug mode",
|
|
aliases: ["d"],
|
|
run(client) {
|
|
if (!a) {
|
|
client.addListener("debug", (...args) => {
|
|
if (client.tDebug) console.log(...args, timestampAt());
|
|
});
|
|
a = true;
|
|
}
|
|
if (client.tDebug) {
|
|
client.tDebug = false;
|
|
return console.log("Debug disabled");
|
|
}
|
|
client.tDebug = true;
|
|
return console.log("Debug enabled");
|
|
}
|
|
} |