Skip to content
endofline edited this page Aug 8, 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
  • enclose <search term> with double-quotes if it contains spaces, and/or special characters
  • <convfilter> can be:
    • id:<convid> or <convid> - returns single matching conversation
    • text:<text fragment> - return conversations with matching fragment in title
    • "" (or not supplied) - returns all conversations (no filter)
    • chat_id:<chatid> - returns conversations where chatid is a participant
    • [ ver >= 2.7 ] tag:<conversation tag> - returns conversations with matching tag
    • [ ver >= 2.7 ] type:ONE_TO_ONE or type:GROUP - returns conversations matching type (case-insensitive)
    • [ ver >= 2.7 ] minusers:<num> - returns conversations with at least <num> users
    • [ ver >= 2.7 ] maxusers:<num> - returns conversations with at most <num> users
    • [ ver >= 2.7 ] random:<float> - returns conversations based on random selection criteria: random.random() generates numbers in range [0.0, 1.0), if the generated number is lower or equal to <float> the conversation will be added
  • [ ver >= 2.7 ] supports multiple filter terms with sequential boolean operations
  • for more information, please see the documentation for the underlying function this command uses - the parameter list and usage is identical

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