Update sweebridge.py
This commit is contained in:
parent
ade4a3a92b
commit
c96de59e44
1 changed files with 4 additions and 0 deletions
|
@ -215,6 +215,10 @@ def ircsession(platform:str, sock:bot_irc):
|
|||
for key, value in userlist.items():
|
||||
if nick in value:
|
||||
target = targets[platform][key]
|
||||
guilded_enable = "guilded" in config[target]
|
||||
discord_enable = "discord" in config[target]
|
||||
gilwebhook = config[target]["guilded"]["webhook"] if guilded_enable else None
|
||||
discwebhook = config[target]["discord"]["webhook"] if discord_enable else None
|
||||
if guilded_enable: hook(gilwebhook, json={"content": nick + " Has quit for reason \"" + " ".join(text.split(" ")[2:])[1:] + "\"", "username": "SweeBridge IRC", "avatar_url": "https://git.swee.codes/swee/SweeBridge/raw/branch/main/logos/sweebridge-" + platform + ".png"})
|
||||
if discord_enable: hook(discwebhook, json={"content": nick + " Has quit for reason \"" + " ".join(text.split(" ")[2:])[1:] + "\"", "username": "SweeBridge IRC", "avatar_url": "https://git.swee.codes/swee/SweeBridge/raw/branch/main/logos/sweebridge-" + platform + ".png"})
|
||||
update(channel_irc, sock)
|
||||
|
|
Loading…
Reference in a new issue