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

Method setTag

src/database/sqlite.ts:195–205  ·  view source on GitHub ↗
(tag: Tag, guild: string)

Source from the content-addressed store, hash-verified

193 }
194
195 async setTag(tag: Tag, guild: string) {
196 const tagData = {
197 guild_id: guild,
198 name: tag.name,
199 content: tag.content,
200 author: tag.author,
201 };
202 this.connection
203 .prepare("INSERT INTO tags (guild_id, name, content, author) VALUES (:guild_id, :name, :content, :author)")
204 .run(tagData);
205 }
206
207 async removeTag(name: string, guild: string) {
208 this.connection.prepare("DELETE FROM tags WHERE guild_id = ? AND name = ?").run(guild, name);

Callers 1

runMethod · 0.45

Calls 1

runMethod · 0.45

Tested by

no test coverage detected