Commit Graph

82 Commits

Author SHA1 Message Date
kingston 504595dc16 Add README for Renamer cog 2026-10-14 19:03:48 -05:00
kingston b3d1a35939 Add Renamer cog for admin-only nickname renaming 2026-10-14 18:58:24 -05:00
kingston add5c68a9a ytaudio: stream yt-dlp into growing file for Lavalink local source
Lavalink's local loader rejects FIFOs and nonexistent files, but loads a
regular file instantly even while it grows. Spawn yt-dlp with -o - writing
into a pre-created regular file, wait until >=64KB is present, then load the
path so the node's ffmpeg decodes it live. Skipping kills the process and
deletes the file; falls back to mp3 download if streaming fails.
2026-10-09 19:42:48 -05:00
kingston 1e4d64013c Add AlbumOfTheDay cog (1001 Albums Generator album of the day, timezone-aware daily post) 2026-10-05 21:01:53 -05:00
kingston 55fe064fe8 assistant: reply 'images not supported' and skip images
The cog's vision_model defaulted to the text-only llama3.2:3b, so any image in
the message/reply was sent to a non-vision model, causing Ollama 400 'invalid
image input'. Now the bot tells the user images aren't supported and continues
with text-only, preserving normal chat.
2026-09-22 23:02:09 -05:00
kingston 1f701beed1 ytaudio: accurate active queue system
Replace the drained asyncio.Queue with an explicit, always-inspectable
model: GuildPlayer.pending (waiting tracks) + current (now playing).
- queue command shows Now playing plus numbered Up next list
- play reports queue position when adding behind an active track
- stop/leave use clear_pending(); skip relies on the TRACK_END event to
  advance exactly one track (no double-skip)
- queue alias q, nowplaying alias np
2026-09-17 17:44:50 -05:00
kingston 51df6f7476 ytaudio: add [p]summon to join VC; revert tts join change
Add a summon command (alias ytjoin) that joins the caller's voice
channel, replacing the old Audio-cog summon. _ensure_connected now
moves the bot with Player.move_to when it is already in a different
channel. Revert the ttstoy tts join back to the simple connect.
2026-09-17 17:33:23 -05:00
kingston 1c6d3c3b5e ttstoy: make tts join behave as a summon
Connect to the caller's voice channel when the bot is not in voice, and
move to the caller's channel if the bot is currently in a different one
(via Player.move_to). Previously it only connected when the bot had no
voice state, so it would not follow the user between channels.
2026-09-17 17:29:36 -05:00
kingston 6816d2dedb ytaudio: live download-progress indicator, plain text only
Post a status message on play and live-edit it with the download
percentage via a throttled yt-dlp progress_hook (max one edit/sec,
scheduled onto the event loop from the executor thread). Shows
Downloading (N%), then Converting to mp3, then Now playing. Removed all
emoji and em-dashes from user-facing strings and comments.
2026-09-17 17:11:59 -05:00
kingston 73061538a5 ytaudio: rename join/leave -> ytjoin/ytleave to avoid command collisions
The Minecraft cog already registers top-level 'join' and 'leave', which
caused a CommandRegistrationError. Namespace these two commands under a
yt-prefix (ytjoin, ytleave, alias ytdc).
2026-09-17 17:04:23 -05:00
kingston bc2ef8a747 ttstoy: decouple from built-in Audio cog
Use the shared Red-Lavalink client directly instead of depending on
redbot.cogs.audio: import lavalink; connect via lavalink.connect();
gate WebUI playback on lavalink.get_all_nodes() instead of
get_cog('Audio'). Playback (get_player pause/save/restore) unchanged.
The lavalink client is now owned by the YTAudio cog.
2026-09-17 17:00:42 -05:00
kingston c7f802c8ef Add YTAudio cog: YouTube playback via yt-dlp -> mp3 -> Lavalink
Standalone cog that owns the Red-Lavalink client connection
(initialize on startup, close on unload) and plays YouTube/yt-dlp
sources by downloading audio, transcoding to mp3, and playing through
Lavalink's local source. Per-guild queues, multi-VC capable. Commands:
play, skip, stop, pause, resume, queue, nowplaying, volume, join, leave.
2026-09-17 17:00:42 -05:00
kingston eb8ab66a8c assistant: add local Ollama backend for the humor chatbot
Make the API base URL configurable (new global config base_url, default to the
local Ollama OpenAI-compatible endpoint http://127.0.0.1:11434/v1 on gpu1).
Local endpoints (127.0.0.1/localhost) need no API key: the on_message, _chat,
and models guards allow a missing key when local, and the Authorization header
is only sent when a key is set. Default guild model is now
llama3.2:3b-instruct-q4_K_M with a humor-focused system prompt. Adds
[p]assistant baseurl to switch endpoints (omit to reset to local), shows the
backend in settings, and raises the request timeout to 120s for local
inference. GreenPT remains usable as a fallback by setting the base URL back to
it and providing a key.

Note: Llama-3.2-3B-Instruct is text-only; the vision path needs a
vision-capable model (e.g. a local llava/llama3.2-vision) or GreenPT.
2026-09-14 18:30:31 -05:00
kingston 2078bb37df style: remove em/en dashes from command help and log text 2026-09-14 18:00:24 -05:00
kingston 6507293554 ttstoy: remove all TTS server management commands from the bot
The dectalk, morshu, and vox servers are managed entirely by systemd now, so
the bot no longer needs to inspect or manage them. Removed the stop and status
commands for all three, the unused dectalk_auto_start config, and the dead
server directory and process attributes. The cog keeps only the fixed ports it
uses to reach the services over HTTP.
2026-09-14 14:46:09 -05:00
kingston daaf568162 ttstoy: remove server start/install commands now handled by systemd
Drop the dectalkstart, dectalkinstall, dectalkautotoggle, morshustart, and
voxstart commands along with the orphaned _start/_stop/_install helper methods
and the dectalk mode-switch auto-start path. The three TTS servers run as
independent systemd services; the stop and status commands now point at
systemctl.
2026-09-14 14:43:16 -05:00
kingston 554122da93 ttstoy: decouple TTS services from the bot lifecycle
The dectalk, morshu, and vox TTS servers now run as independent systemd
services on their fixed ports (33001/33002/33003). The cog no longer spawns
or kills them: start/stop helpers became reachability checks and no-ops, the
cog_load auto-start and cog_unload teardown were removed, and the start/stop/
status commands now point at systemctl. The HTTP client calls are unchanged.
2026-09-14 14:35:53 -05:00
kingston e71c778f44 docs: webui now separate service; add Grigori MiniMax alias 2026-09-14 12:23:34 -05:00
kingston 7a88dba1e5 refactor: move webui out of cog, use shared-state pending queue
- drop bundled Flask webui (now lives in scrapyard-website TtsToy)
- _take_pending_state_updates: pop pending commands/posts + refresh user
  info under cross-process lock, matching the webui-side producer
2026-09-14 11:45:47 -05:00
kingston 58acd1c001 fix: persist user guild map when login token is registered
user_guild_map was only written when a login token was consumed on the
webui login page. Users on stale session cookies never re-login, so
their jobs carried empty guild_id and TTS was posted to whatever global
channel happened to match instead of the server they logged in from.
Persist the guild as soon as the bot registers the token so
_resolve_guild_id() falls back to the correct login guild.
2026-09-12 22:12:21 -05:00
kingston cb5f26f6c6 fix: route webui internal callbacks to localhost
The bot posts job-status updates and login-token registration to the
public webui URL (ttstoy.kingstons-scrapyard.net) with a 5s timeout.
Under load, that WAN hop times out and jobs stay stuck 'pending' even
though audio was generated. Since the webui runs as a child process of
the bot on the same host, use http://127.0.0.1:8098 for these
server-to-server callbacks instead.
2026-09-12 22:00:29 -05:00
kingston d61bef01cd fix: trim chatterbox voice uploads over 30s in webui 2026-09-08 00:22:47 -05:00
kingston b81b638f17 fix: trim long chatterbox voice clips to 30s on upload 2026-09-07 23:41:07 -05:00
kingston 516133a239 DM listed users when deadman is armed 2026-09-07 15:49:17 -05:00
kingston 5ed2f0d200 Add deadman switch cog 2026-09-07 15:45:03 -05:00
kingston 731983949a Add vision model support: auto-switch on image detection, visionmodel command 2026-08-17 00:40:04 -05:00
kingston d8f809f890 Add showprompt command (admin only) to display full system prompt 2026-08-16 23:51:38 -05:00
kingston 3aafef93c0 Add reasoning command to control reasoning_effort per guild 2026-08-16 23:49:15 -05:00
kingston 327b8b2fd7 Add reasoning_effort: none to prevent empty content from reasoning models 2026-08-16 23:48:03 -05:00
kingston 9fb5ecc0e7 Fix models sort (by output cost), filter non-chat models, add compression variants 2026-08-16 23:45:23 -05:00
kingston 06467d2e38 Remove reasoning_content fallback - don't expose internal thinking 2026-08-16 23:43:15 -05:00
kingston 5679134fc3 Handle DeepSeek reasoning_content fallback for empty responses 2026-08-16 23:27:56 -05:00
kingston fd76ea153b Debug: show raw API response when empty 2026-08-16 23:26:13 -05:00
kingston f29aec3d18 Handle empty API responses gracefully 2026-08-16 23:22:47 -05:00
kingston 77a044047e Add maxlength command to set max response tokens 2026-08-16 23:21:10 -05:00
kingston 0dbf154b3f Fix API URL (api.greenpt.ai), add models command, remove debug logging 2026-08-16 23:07:29 -05:00
kingston be9bb058d4 Debug: use log.info for visible console output 2026-08-16 23:04:25 -05:00
kingston b880b11ecf Fix: remove strict TextChannel check, broaden channel support 2026-08-16 23:03:55 -05:00
kingston a319feb8ff Debug: add reaction indicators to trace on_message 2026-08-16 23:01:04 -05:00
kingston e83772ea7a Add debug logging to on_message listener 2026-08-16 22:58:09 -05:00
kingston e7a86682f6 Fix setkey: use button+modal instead of ctx.send_modal 2026-08-16 22:55:02 -05:00
kingston 406858b26f Fix command group: use @commands.group decorator instead of Group() 2026-07-31 20:48:48 -05:00
kingston 7f3646745b Rename greeptchat cog to assistant - generic AI chatbot branding 2026-07-31 20:41:40 -05:00
kingston 1b0c164997 Add GreeptChat cog - GreenPT API chat integration 2026-07-27 07:20:44 -05:00
kingston 613d9a83b2 Add imagegrab cog: zip channel images with type-based filenames
Images are named using the message text as the filename (type tags for
WebTable card decks). Single image = text.ext, multiple = text_1.ext,
text_2.ext, etc. Falls back to messageID.ext when no text is present.
2026-07-25 16:11:58 -05:00
kingston 245a9e1737 Simplify playit cog - channel ID config, status command 2026-07-10 07:14:11 -05:00
kingston 5838ec9a33 Add playitstatus cog - monitor playit.gg status 2026-07-10 07:12:12 -05:00
kingston 1427323f36 feat: add minimax mode to /api/mc/tts endpoint 2026-06-09 16:06:54 -05:00
kingston f7be19fa27 feat: rewrite /api/mc/tts with full ttstoy pipeline
- SFX emoji interleaving (inline 🎉💀🔥 etc.)
- Voice switching via [mode|voice] tags
- Chatterbox turbo tokens ([laugh], [cough]) passthrough
- Multi-segment audio concatenation via ffmpeg
- Supports all modes: chatterbox, clone, dectalk, morshu, vox
2026-06-09 11:19:39 -05:00
kingston a7128d0e72 fix: update chatterbox_api_url default to 192.168.0.200 2026-06-09 11:10:52 -05:00