Coder Social home page Coder Social logo

devilutionx-gamelist's Introduction

Linux Windows

devilutionx-gamelist

Small program for printing out a json list of current games

How to build

cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build -j

devilutionx-gamelist's People

Contributors

ajenbo avatar dakkjaniels avatar ephphatha avatar kphoenix137 avatar stephencwills avatar wkdgmr avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

devilutionx-gamelist's Issues

Ignoring exception in on_ready

This error appears to stop the bot from running, wonder if it's solvable.

2024-04-28 11:55:47 ERROR    discord.client Ignoring exception in on_ready
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/discord/client.py", line 441, in _run_event
    await coro(*args, **kwargs)
  File "/home/ajenbo/test.py", line 269, in on_ready
    await background_task()
  File "/home/ajenbo/test.py", line 255, in background_task
    await client.change_presence(activity=activity)
  File "/usr/lib/python3/dist-packages/discord/client.py", line 2040, in change_presence
    await self.ws.change_presence(activity=activity, status=status_str)
  File "/usr/lib/python3/dist-packages/discord/gateway.py", line 701, in change_presence
    await self.send(sent)
  File "/usr/lib/python3/dist-packages/discord/gateway.py", line 655, in send
    await self.socket.send_str(data)
  File "/usr/lib/python3/dist-packages/aiohttp/client_ws.py", line 151, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/usr/lib/python3/dist-packages/aiohttp/http_websocket.py", line 690, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/usr/lib/python3/dist-packages/aiohttp/http_websocket.py", line 601, in _send_frame
    raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

Refactor main bot loop to not be inside of the Discord SDK

Currently the main loop is brought up through the Discord SDK events:

await backgroundTask()

This can become interrupted when the Discord connection is lost and does not get re initialized when once the connection is reestablished. Probably it would be better to have this loop run in it's own thread and talk to the Discord client from the outside (checking it's online status first).

This appears to be the main reason that the bot sometimes goes down and needs to be restarted manually.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.