Giter Club home page Giter Club logo

lunch-bot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

sadighasanzade

lunch-bot's Issues

Content length limit

Unhandled exception in internal background task 'lunchtime'.
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.10/site-packages/discord/ext/tasks/__init__.py", line 176, in _loop
    await self.coro(*args, **kwargs)
  File "/home/container/src/main.py", line 106, in lunchtime
    message = await channel.send(offers)
  File "/home/container/.local/lib/python3.10/site-packages/discord/abc.py", line 1438, in send
    data = await state.http.send_message(
  File "/home/container/.local/lib/python3.10/site-packages/discord/http.py", line 357, in request
    raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In content: Must be 2000 or fewer in length.

Retry missing offers

If some restaurant offers are missing, retry for some period of time (1 hour?) every X minutes (5?) and edit the original message if the offer is added later.

This would allow moving the message time to earlier, 11:00 for example, since the restaurants whose offer gets added later will be added later.

Sending the initial offer earlier would also remove the need for a command to get current offers, since all the current offers should already be available.

Breaks when daylight saving time changes

Currently UTC time for lunch is set once, when Discord client is initialized. If DST changes the offset while the bot is running, the lunch time will be off by an hour. Workaround is to restart the bot when this happens.

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.