tools.discord_upload_file module
Upload a file to a Discord channel, thread, or DM.
Handles all known Discord upload failure states including DM resolution, file size limits (per guild boost tier), archived/locked threads, forum/voice channels, rate limits, and transient network errors.
- async tools.discord_upload_file.run(channel_id=None, user_id=None, content=None, filename=None, filepath=None, ctx=None)[source]
Execute this tool and return the result.
- Parameters:
channel_id (
str|None) – Discord/Matrix channel identifier.ctx (
ToolContext|None) – Tool execution context providing access to bot internals.
- Returns:
Result string.
- Return type: