(tag: Tag, guild: string)
| 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); |