Created
February 21, 2021 21:45
-
-
Save jesopo/0b71051d8df3ccd080bbb6ce23a34f55 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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