mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-24 06:04:57 +05:00
fix for real
This commit is contained in:
parent
511976a239
commit
9a335aa3e2
2 changed files with 7 additions and 6 deletions
|
@ -194,7 +194,7 @@ async function changeSetting(interaction, setting, state, channel) {
|
||||||
if (!state) {
|
if (!state) {
|
||||||
data.plugins[settingSplitted[0]][settingSplitted[1]] = null;
|
data.plugins[settingSplitted[0]][settingSplitted[1]] = null;
|
||||||
|
|
||||||
data.markModified(setting);
|
data.markModified(`plugins.${setting}`);
|
||||||
await data.save();
|
await data.save();
|
||||||
|
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
|
@ -207,7 +207,7 @@ async function changeSetting(interaction, setting, state, channel) {
|
||||||
if (channel) {
|
if (channel) {
|
||||||
data.plugins[settingSplitted[0]][settingSplitted[1]] = channel.id;
|
data.plugins[settingSplitted[0]][settingSplitted[1]] = channel.id;
|
||||||
|
|
||||||
data.markModified(setting);
|
data.markModified(`plugins.${setting}`);
|
||||||
await data.save();
|
await data.save();
|
||||||
|
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
|
@ -226,7 +226,7 @@ async function changeSetting(interaction, setting, state, channel) {
|
||||||
if (!state) {
|
if (!state) {
|
||||||
data.plugins[setting] = null;
|
data.plugins[setting] = null;
|
||||||
|
|
||||||
data.markModified(setting);
|
data.markModified(`plugins.${setting}`);
|
||||||
await data.save();
|
await data.save();
|
||||||
|
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
|
@ -237,7 +237,7 @@ async function changeSetting(interaction, setting, state, channel) {
|
||||||
if (channel) {
|
if (channel) {
|
||||||
data.plugins[setting] = channel.id;
|
data.plugins[setting] = channel.id;
|
||||||
|
|
||||||
data.markModified(setting);
|
data.markModified(`plugins.${setting}`);
|
||||||
await data.save();
|
await data.save();
|
||||||
|
|
||||||
return interaction.reply({
|
return interaction.reply({
|
||||||
|
|
|
@ -60,10 +60,11 @@ class CommandHandler extends BaseEvent {
|
||||||
client.logger.cmd(
|
client.logger.cmd(
|
||||||
`[${interaction.guild ? interaction.guild.name : "DM"}]: [${interaction.user.getUsername()}] => /${command.command.name}${
|
`[${interaction.guild ? interaction.guild.name : "DM"}]: [${interaction.user.getUsername()}] => /${command.command.name}${
|
||||||
interaction.options.data.length > 0
|
interaction.options.data.length > 0
|
||||||
? ", args: " + interaction.options.data
|
? `, args: [${interaction.options.data
|
||||||
.map(arg => {
|
.map(arg => {
|
||||||
return `${arg.name}: ${arg.value}`;
|
return `${arg.name}: ${arg.value}`;
|
||||||
}).join(", ")
|
})
|
||||||
|
.join(", ")}]`
|
||||||
: ""
|
: ""
|
||||||
}`,
|
}`,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue