lunch-bot's People
Forkers
sadighasanzadelunch-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.
Slack integration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.