Skip to content

Instantly share code, notes, and snippets.

@nylonee
Created July 12, 2015 16:06
Show Gist options
  • Save nylonee/bef628e07435fee3a6a0 to your computer and use it in GitHub Desktop.
Save nylonee/bef628e07435fee3a6a0 to your computer and use it in GitHub Desktop.
Hard-coding a one-click broadcast
import hangups
import plugins
def _initialise(bot):
plugins.register_admin_command(["sendmessage"])
def sendmessage(bot, event, *args):
"""Send a hard-coded message"""
message = "Attention! Nihal is awesome!"
conv_ids = ['ENTER FIRST CONV_ID HERE', 'ENTER SECOND CONV_ID HERE', 'AND SO ON...']
for conv_id in conv_ids:
bot.send_html_to_conversation(conv_id, message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment