MCPcopy Create free account
hub / github.com/esmBot/esmBot / enableCommand

Method enableCommand

src/database/sqlite.ts:151–158  ·  view source on GitHub ↗
(guild: string, command: string)

Source from the content-addressed store, hash-verified

149 }
150
151 async enableCommand(guild: string, command: string) {
152 const guildDB = await this.getGuild(guild);
153 const newDisabled = guildDB.disabled_commands ? guildDB.disabled_commands.filter((item) => item !== command) : [];
154 this.connection
155 .prepare("UPDATE guilds SET disabled_commands = ? WHERE guild_id = ?")
156 .run(JSON.stringify(newDisabled), guild);
157 disabledCmdCache.set(guild, newDisabled);
158 }
159
160 async disableChannel(channel: string, guild: string) {
161 const guildDB = await this.getGuild(guild);

Callers 1

runMethod · 0.45

Calls 3

getGuildMethod · 0.95
runMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected