catzoo / image-bot Goto Github PK
View Code? Open in Web Editor NEWA discord bot image bot that is similar to Pokecord. Bot is specifically designed for Pawing Around discord server.
License: MIT License
A discord bot image bot that is similar to Pokecord. Bot is specifically designed for Pawing Around discord server.
License: MIT License
I forgot on_ready
runs more than once so the been up for time is incorrect
01-13-2020, 22:46:00.3, INFO, image.py, root | Sending next image at 2020-01-13 22:47:00
01-13-2020, 22:47:00.3, INFO, image.py, root | Sending image
01-13-2020, 22:47:00.4, INFO, image.py, root | Sending next image at 2020-01-13 22:48:00
01-13-2020, 22:47:59.999, INFO, image.py, root | Sending next image at 2020-01-13 22:48:00
01-13-2020, 22:48:00.0, ERROR, __init__.py, discord.ext.tasks | Internal background task failed.
Traceback (most recent call last):
File "C:\Users\catzoo\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\tasks\__init__.py", line 68, in _loop
await self.coro(*args, **kwargs)
File "C:\Users\catzoo\Desktop\github\image-bot\cog\image.py", line 251, in image_before_loop
self.image_before_loop.change_interval(seconds=get_date().total_seconds())
File "C:\Users\catzoo\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\tasks\__init__.py", line 342, in change_interval
raise ValueError('Total number of seconds cannot be less than zero.')
ValueError: Total number of seconds cannot be less than zero.
# waiting until the next image send
add_time()
logging.info(f'Sending next image at {self.time}')
self.image_before_loop.change_interval(seconds=get_date().total_seconds())
It adds the time and it still "before" self.time
but when it gets done and use get_date
it becomes after. Somehow its running it at :59.999
. Dang it gets exactly on point.
Idea 1: Add a try, except ValueError
and have it run the function again so it'll send the image when this happens
idea 2: move change_interval
to the top.
Keep track of which images belongs to which users.
Allow users to:
Change the images database to:
[ ] [img_id] [url] [name] [claim_user]
This should allow users to see which images they have and allow them to give their claimed images to other users / back.
test
Allow the command to:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.