Skip to content
Innocent Bystander edited this page Aug 6, 2015 · 6 revisions

[ ver < 2.7 ] Requires plugin: default, [ ver >= 2.7 ] no plugin dependency

Commands to remotely manipulate other conversations the bot is participating in.

Note: These commands use a POSIX-style lexer to process parameters. Each parameter can be double-quoted if it contains spaces and/or special characters, especially string output. The backslash (\) can also be used to escape special characters.

WARNING: These commands allow you to act on many conversations in single command. Please exercise due caution when using them!

convfilter <search term>

  • works like bash pgrep for pkill - use this command to test your convfilter search terms before using it for other convid-commands
  • lists filtered conversation by id, title and number of users
  • <search term> can be:
    • id:<convid> or <convid> - returns single matching conversation
    • text:<text fragment> - return multiple conversations with matching fragment in title
    • "" - returns all conversations (no filter)
    • chat_id:<chatid> - returns all conversation where chatid is a participant
  • enclose <search term> with double-quotes if it contains spaces, and/or special characters
  • implemented in bot.conversations.get(filter=False) - a replacement function for all instances where legacy bot.list_conversations() is required

convecho <convfilter: search term> <text>

  • echo back <text> into filterered conversation(s)
  • can be used for bulk echos depending on <convfilter: search term> - use /bot convfilter to identify targeted conversations
  • to avoid spam, "" as a <convfilter: search term> is blocked
  • both parameters can be optionally enclosed by double-quotes - highly recommended if they contain spaces, and/or special characters
  • html and markdown supported in <text>
  • /bot echo and /bot echoparsed remapped to this command internally
    • note: /bot echoparsed obsoleted

convrename <convfilter: search term> <title>

  • renames a single matched conversation
  • if <convfilter: search term> matches multiple conversations, only the first one will be renamed - therefore, it is not recommended to use "fuzzy" search terms
  • both parameters can be optionally enclosed by double-quotes - highly recommended if they contain spaces, and/or special characters
  • /bot rename remapped to this command internally

convusers <convfilter: search term>

  • displays the user list for matched conversations
  • user list contains user chat id and user name
  • to avoid generating excessively large messages, "" as a <convfilter: search term> is blocked
  • <convfilter: search term> can be optionally enclosed by double-quotes - highly recommended if it contains spaces, and/or special characters
  • /bot users remapped to this command internally

convleave <convfilter: search term> [quietly]

  • leaves the matched conversations
  • append quietly flag so the bot doesn't announce anything before leaving
  • to avoid accidentally leaving ALL conversations, "" as a <convfilter: search term> is blocked
  • <convfilter: search term> can be optionally enclosed by double-quotes - highly recommended if it contains spaces, and/or special characters
  • /bot leave remapped to this command internally

# ## ###

Clone this wiki locally