Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ Retrieves the profile picture of the given user.

**[Admin Only by default]** Manually triggers the room finder data scraper to update the database with current semester schedule information. This is useful for forcing an immediate update without waiting for the automatic Sunday schedule. Takes 10-15 minutes to complete and runs in the background. Shows real-time progress if a scrape is already running.

### /sendtag

Not complete. For now, this command simply auto-completes the tag the user types, but it does not send the tag.

### /setreactboard

Creates a new reactboard or updates an existing one. A reactboard is a channel where the bot will repost messages that recieve a specified number of a specified reaction. The primary use is for a starboard where messages that receive the right number of stars will be added, along with how many stars they received.
Expand All @@ -108,6 +104,18 @@ Temporarily prevents a user from using bot commands for one hour. Only administr

Tracks a statistic for the issuer. Use the `track` subcommand to begin tracking, `update` to add or subtract to it, `list` to show all the stats being tracked for the issuer, `leaderboard` to show the users with the highest scores for a stat, and `untrack` to stop tracking a stat for you.

### /tag ( add / send / preview / list / remove )

Manage and use tagged images and links within your server. Tags are server-specific and tracked with usage statistics.

- **add** - Create a new tag with a name and content (URL or text). Maximum 100 characters for name, 2000 for content.
- **send** - Post a tag publicly in the channel. Automatically displays images as embeds.
- **preview** - View tag details privately (ephemeral), including creator, use count, and creation date.
- **list** - List all available tags in the server with their creators and use counts.
- **remove** - Delete a tag you created. Admins can delete any tag.

Tag names support autocomplete for easy discovery.

### /talk

Uses the [dectalk](https://github.com/JstnMcBrd/dectalk-tts) text-to-speech engine to speak the message you give it, either sending a .wav file in a text channel or talking out loud in a voice channel. Comes with 9 different voices.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "csbot",
"version": "0.16.0",
"version": "0.17.0",
"private": true,
"description": "The One beneath the Supreme Overlord's rule. A bot to help manage the BYU CS Discord, successor to Ze Kaiser (https://github.com/arkenstorm/ze-kaiser)",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ CREATE TABLE "Tag" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"guildId" TEXT NOT NULL,
"name" TEXT NOT NULL,
"content" TEXT NOT NULL,
"imageData" BLOB NOT NULL,
"fileName" TEXT NOT NULL,
"contentType" TEXT NOT NULL,
"createdBy" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"useCount" INTEGER NOT NULL DEFAULT 0
Expand Down
16 changes: 9 additions & 7 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,15 @@ model User {
}

model Tag {
id Int @id @default(autoincrement())
guildId String // Discord guild ID - tags are per-guild
name String // Tag name (unique per guild)
content String // URL or text content
createdBy String // Discord user ID of creator
createdAt DateTime @default(now())
useCount Int @default(0) // Track how many times tag has been used
id Int @id @default(autoincrement())
guildId String // Discord guild ID - tags are per-guild
name String // Tag name (unique per guild)
imageData Bytes // Binary image data stored locally
fileName String // Original filename (e.g. "funny.png")
contentType String // MIME type (e.g. "image/png")
createdBy String // Discord user ID of creator
createdAt DateTime @default(now())
useCount Int @default(0) // Track how many times tag has been used

@@unique([guildId, name], name: "guild_tag")
@@index([guildId])
Expand Down
4 changes: 3 additions & 1 deletion src/@types/Command.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ declare global {
*/
autocomplete?: (
interaction: Omit<AutocompleteInteraction, 'respond'>
) => Array<ApplicationCommandOptionChoiceData>;
) =>
| Array<ApplicationCommandOptionChoiceData>
| Promise<Array<ApplicationCommandOptionChoiceData>>;
}

interface GlobalCommand extends BaseCommand {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ import { help } from './help.js';
import { isCasDown } from './isCasDown.js';
import { profile } from './profile.js';
import { scrapeRooms } from './scrapeRooms.js';
import { sendtag } from './sendtag.js';
import { setReactboard } from './setReactboard.js';
import { smite } from './smite.js';
import { unsmite } from './unsmite.js';
import { stats } from './stats.js';
import { tag } from './tag.js';
import { talk } from './talk.js';
import { toTheGallows } from './toTheGallows.js';
import { xkcd } from './xkcd.js';
Expand All @@ -54,10 +54,10 @@ _add(help);
_add(isCasDown);
_add(profile);
_add(scrapeRooms);
_add(sendtag);
_add(setReactboard);
_add(smite);
_add(stats);
_add(tag);
_add(unsmite);
_add(talk);
_add(toTheGallows);
Expand Down
44 changes: 0 additions & 44 deletions src/commands/sendtag.test.ts

This file was deleted.

64 changes: 0 additions & 64 deletions src/commands/sendtag.ts

This file was deleted.

Loading