Skip to content

Instantly share code, notes, and snippets.

@jesopo
Created February 21, 2021 21:45
Show Gist options
  • Save jesopo/0b71051d8df3ccd080bbb6ce23a34f55 to your computer and use it in GitHub Desktop.
Save jesopo/0b71051d8df3ccd080bbb6ce23a34f55 to your computer and use it in GitHub Desktop.
from src import ModuleManager, utils
class Module(ModuleManager.BaseModule):
@utils.hook("api.post.hashbang-argocd")
def webhook(self, event):
server = self.bot.get_server_by_alias("hashbang")
if server and "#!" in server.channels:
channel = server.channels.get("#!")
data = event["data"].decode("utf8")
self.events.on("send.stdout").call(target=channel,
module_name="argocd", server=server, message=data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment