Compare commits

..

No commits in common. "master" and "9822d7770c7cea1b76a14de378452364a83d806d" have entirely different histories.

3 changed files with 7 additions and 19 deletions

View File

@ -21,7 +21,7 @@ The bridge can be configured via `config.toml` at either the current working dir
[general]
jid = "discord.server.example" # JID of the server component
secret = "secret" # Component secret
server = "server.example" # Address of the actual XMPP server
server = "server.example # Address of the actual XMPP server
port = 5869 # Component port
discord_token "...." # Token of your Discord bot
@ -80,4 +80,4 @@ of `member`.
## License
See `./LICENSE`
See `./LICENSE`

View File

@ -9,10 +9,10 @@ setup(
license = "GPLc3",
packages = find_packages(),
install_requires = [
"requests==2.27.1",
"slixmpp==1.7.1",
"requests>=2.26.0",
"slixmpp>=1.7.1",
"nextcord",
"toml==0.10.2"
"toml>=0.10.2"
],
extra_require = {
"dev": [

View File

@ -206,11 +206,7 @@ class BridgeComponent(ComponentXMPP):
wh = None
for webhook in await dchannel.webhooks():
if webhook.name == "discord-xmpp-bridge":
if not webhook.is_authenticated():
_logger.info("Webhook for %s has no token. Deleting and recreating" % muc)
await webhook.delete(reason="Webhook has no token. Will recreate")
else:
wh = webhook
wh = webhook
break
if not wh:
wh = await dchannel.create_webhook(name="discord-xmpp-bridge",
@ -530,15 +526,7 @@ def main():
general["port"],
general["discord_token"],
config)
for xep in [
"0030",
"0199",
"0045",
"0084",
"0153",
"0054",
"0060"
]:
for xep in [ "0030", "0199", "0045", "0084", "0153", "0054", "0060" ]:
xmpp.register_plugin(f"xep_{xep}")
logging.basicConfig(stream=sys.stdout, level=verbosity)