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

Method enableChannel

src/database/sqlite.ts:168–175  ·  view source on GitHub ↗
(channel: string, guild: string)

Source from the content-addressed store, hash-verified

166 }
167
168 async enableChannel(channel: string, guild: string) {
169 const guildDB = await this.getGuild(guild);
170 const newDisabled = guildDB.disabled.filter((item: string) => item !== channel);
171 this.connection
172 .prepare("UPDATE guilds SET disabled = ? WHERE guild_id = ?")
173 .run(JSON.stringify(newDisabled), guild);
174 disabledCache.set(guild, newDisabled);
175 }
176
177 async getTag(guild: string, tag: string) {
178 const tagResult = this.connection.prepare("SELECT * FROM tags WHERE guild_id = ? AND name = ?").get(guild, tag) as

Callers 1

runMethod · 0.45

Calls 3

getGuildMethod · 0.95
runMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected