tools.discord_poll module

Create a native Discord poll in a channel.

async tools.discord_poll.run(question, answers, channel_id=None, duration_hours=24, allow_multiselect=False, ctx=None)[source]

Create and send a Discord poll.

Parameters:
  • question (str) – The poll question text.

  • answers (list[str]) – List of answer option strings.

  • channel_id (str | None) – Target channel ID. Falls back to context channel.

  • duration_hours (int) – Poll duration in hours (1-168).

  • allow_multiselect (bool) – Allow voting for multiple options.

  • ctx (ToolContext | None) – Tool execution context.

Return type:

str

Returns:

Result string.