| 133 | } |
| 134 | |
| 135 | async disableCommand(guild: string, command: string) { |
| 136 | const guildDB = await this.getGuild(guild); |
| 137 | this.connection |
| 138 | .prepare("UPDATE guilds SET disabled_commands = ? WHERE guild_id = ?") |
| 139 | .run( |
| 140 | JSON.stringify( |
| 141 | (guildDB.disabled_commands ? [...guildDB.disabled_commands, command] : [command]).filter((v) => !!v), |
| 142 | ), |
| 143 | guild, |
| 144 | ); |
| 145 | disabledCmdCache.set( |
| 146 | guild, |
| 147 | guildDB.disabled_commands ? [...guildDB.disabled_commands, command] : [command].filter((v) => !!v), |
| 148 | ); |
| 149 | } |
| 150 | |
| 151 | async enableCommand(guild: string, command: string) { |
| 152 | const guildDB = await this.getGuild(guild); |