Update sweebridge.py
This commit is contained in:
parent
8686bfcafe
commit
4975e2d3bc
1 changed files with 28 additions and 24 deletions
|
@ -86,6 +86,7 @@ def parse_content(text:str, platform:int, target:str):
|
||||||
# platform will be the value of the incoming platform, not any outgoing ones.
|
# platform will be the value of the incoming platform, not any outgoing ones.
|
||||||
e = [text]
|
e = [text]
|
||||||
if platform == 1 and "discord" in config[target]: # Parse IRC -> Discord
|
if platform == 1 and "discord" in config[target]: # Parse IRC -> Discord
|
||||||
|
try:
|
||||||
members = {}
|
members = {}
|
||||||
for i in client2.get_guild(config[target]["discord"]["guild"]).members:
|
for i in client2.get_guild(config[target]["discord"]["guild"]).members:
|
||||||
try:
|
try:
|
||||||
|
@ -109,6 +110,9 @@ def parse_content(text:str, platform:int, target:str):
|
||||||
if not broken:
|
if not broken:
|
||||||
temp.append(i) # Aknowledge the typo ;3
|
temp.append(i) # Aknowledge the typo ;3
|
||||||
e.append("".join(temp))
|
e.append("".join(temp))
|
||||||
|
except:
|
||||||
|
# Just append the text, don't interrupt the parse.
|
||||||
|
e.append(text)
|
||||||
else:
|
else:
|
||||||
e.append(text)
|
e.append(text)
|
||||||
if platform != 3 and "guilded" in config[target]: # Parse IRC -> Guilded:
|
if platform != 3 and "guilded" in config[target]: # Parse IRC -> Guilded:
|
||||||
|
@ -136,7 +140,7 @@ def ircsession(platform:str, sock:bot_irc):
|
||||||
try:
|
try:
|
||||||
if text != "":
|
if text != "":
|
||||||
print([text])
|
print([text])
|
||||||
content = ":".join(text.split(":")[2:])
|
content = ":".join(" ".join(text.split(" ")[1:]).split(":")[1:])
|
||||||
chan = text.split(" ")[2]
|
chan = text.split(" ")[2]
|
||||||
nick = text.split(" ")[0][1:].split("!")[0]
|
nick = text.split(" ")[0][1:].split("!")[0]
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in a new issue