Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Deutscher775 committed Aug 30, 2024
1 parent cb8c237 commit a35f5ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
26 changes: 1 addition & 25 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,14 @@ TMP
__pycache__
endpoints*
tokens*
<<<<<<< Updated upstream
tokens.json
config.py
website*
_astroidapi.log
*.gitignore
src/tokens.json
src/tokens.json
/web
/website
website/privacy.html
src/csdsc.py
src/Copy of Copy of api.py
src/Copy of api.py
src/Bot/config.py
=======
src/tokens.json
src/Bot/config.py
src/Bot/config.py
src/_astroidapi.log
/website
src/tokens.json
src/tokens.json
/web
website.zip
/website
src/Bot/nerimity_servers/1528027692992208896.json
>>>>>>> Stashed changes
src/Bot/config.py
src/tokens.json
src/astroidapi.zip
src/astroidapi/beta_config.py
src/Bot/config.py
src/tokens.json
src/tokens.json

1 change: 1 addition & 0 deletions src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ async def post_endpoint(
beta=beta,
only_check=only_check,
)
return astroidapi.surrealdb_handler.get_endpoint(endpoint)


@api.patch("/sync", description="Sync the local files with the database.")
Expand Down
3 changes: 3 additions & 0 deletions src/astroidapi/sending_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import astroidapi.formatter as formatter
import astroidapi.attachment_processor as attachment_processor
import os
import traceback


class SendingHandler():
Expand All @@ -22,6 +23,7 @@ async def distribute(cls, endpoint, updated_json):

registered_platforms = [platform for platform in updated_json["config"]["channels"] if len(updated_json["config"]["channels"][platform]) > 0]

print("Author ID: " + updated_json["meta"]["message"]["author"]["id"])
if updated_json["meta"]["message"]["author"]["id"] == "-11111":
if len(updated_json["meta"]["message"]["attachments"]) > 0:
attachments = []
Expand All @@ -44,6 +46,7 @@ async def distribute(cls, endpoint, updated_json):
await attachment_processor.clear_temporary_attachments()
return True
except Exception as e:
traceback.print_exc()
raise errors.SendingError.DistributionError(e)


Expand Down

0 comments on commit a35f5ba

Please sign in to comment.