-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP][Welcome] Add dynamic welcome image generation #582
base: V3/testing
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you exclude other files and only include cogs/welcome
files in the PR? Let the changes be local to the issue you're fixing 👍
Hola, do we have any updates on this @jlacsamana ? |
…into welcomes-upgrade
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a first pass on latest changes, please add screenshots of the testing done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted a number of things. Also can you add type hints for your methods too? I see that command handling methods have type hints but not the rest.
There are a number of .vs
files so please exclude them.
Any updates on this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a quick pass. A few TODOs for you:
- Resolve all the comments. There are still unresolved comments from past reviews without any replies.
- Keep sentences in docstring and replies consistent. Some of them have multiple verb tenses and don't end with a dot or an exclamation mark.
- Exclude irrelevant files. I see unnecessary
.gitignore
and.vs
changes that get committed, but they don't contribute to the feature you're implementing. If you need to have your own.gitignore
, you can add your own one with Git global settingcore.excludesFile
. Try to prepare your PR properly so that only files incogs/welcome
are included.
Also I've got to break it to you... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove all VS code additions from this PR.
Summary
Implements the features requested in Issue #579 as requested.
Testing
Loading Cog
![image](https://user-images.githubusercontent.com/63628806/235033402-6ed78be3-ec1f-455c-8bf6-aea6aeb07c5d.png)
Creating Directory To Store Images (Has folders for each server)
![image](https://user-images.githubusercontent.com/63628806/235040275-b6dc73dd-e7c0-4b5f-b0ed-30f683ed0a41.png)
Before
After
![image](https://user-images.githubusercontent.com/63628806/235040482-c0d39bb4-bcf5-4d67-a736-997adffb7fe7.png)
Ensure Directory To Store Images For Specific Server exists: ensureCurrentServerHasImgCache()
![image](https://user-images.githubusercontent.com/63628806/235041765-ee07b5ec-6b0d-4f7c-8d55-eb0d00dba5e3.png)
Before
After
![image](https://user-images.githubusercontent.com/63628806/235042015-f705da4a-c226-41e1-9357-ec66b6a57498.png)
Random Welcome Image Generation: generateRandWelcomeImg()
![image](https://user-images.githubusercontent.com/63628806/235054164-59c5700f-a10a-4899-b905-b5ad0437a77d.png)
![image](https://user-images.githubusercontent.com/63628806/235054533-ccf2907f-cd65-4a0b-93a3-ba38eedcfe90.png)
3 Passes of the the random image generator
Welcome Image toggle on and off: [p]welcomeset greetings toggleimg
![image](https://user-images.githubusercontent.com/63628806/235041958-b5181ff5-274d-41c9-95c7-443bbf2efcea.png)
When there is no cache created for this server, make one & toggle to false
If there are no images in cache, toggle to false, and alert user about it
![image](https://user-images.githubusercontent.com/63628806/235043871-c0309d0c-ee7f-433c-9f71-d0b85a7ebe26.png)
If there are images in cache, and currently toggled false, toggle true
![image](https://user-images.githubusercontent.com/63628806/235053704-0a62ce6d-4959-4504-9b8b-1f8d41fa7b34.png)
If there are images in cache, and currently toggled true, toggle false
![image](https://user-images.githubusercontent.com/63628806/235053753-f9eb9a40-2b96-4415-a9ef-1216aad6faad.png)
Fetch Image Template: [p]welcomeset greetings image template
![image](https://user-images.githubusercontent.com/63628806/235041561-fcb8c0a7-ab23-48b1-9e85-9fa25249b35f.png)
Add a new image: [p]welcomeset greetings image add
![image](https://user-images.githubusercontent.com/63628806/235051860-428d65bf-7e49-42d8-87fd-21549ada2acb.png)
if an image is added with an unused name
if image is added, but name is already in use
![image](https://user-images.githubusercontent.com/63628806/235052773-2f6d690f-c20d-4da3-8eb6-64d161eb0c0e.png)
if command is used, but no image is provided
![image](https://user-images.githubusercontent.com/63628806/235052926-1c2d4f90-28d2-4e5b-a97b-a447742734cb.png)
if command is used, but multiple images are provided
![image](https://user-images.githubusercontent.com/63628806/235052855-e287a0b1-3422-4ac5-bcd5-f379d0e4c8c0.png)
Remove an existing image by name: [p]welcomeset greetings image remove
![image](https://user-images.githubusercontent.com/63628806/235053165-a155717d-2c7e-49c7-9cc4-36ff204785a5.png)
if name specified matches the name of an image in this server's cache
if name specified doesn't match the name of any image in this server's cache
![image](https://user-images.githubusercontent.com/63628806/235053233-6f3ae269-8ef7-409b-9342-57ca4e880882.png)
if last image removed, toggles off random image generation
![image](https://user-images.githubusercontent.com/63628806/235053417-e4cad4bd-28bd-41d1-82d2-cdef77a9e64d.png)
View an image, fetched from server's image cache by name: [p]welcomeset greetings image view
![image](https://user-images.githubusercontent.com/63628806/235054695-9c4c7c0d-91fe-445d-82a8-ea2904ad8a07.png)
if name specified matches the name of an image in this server's cache
if name specified doesn't match the name of any image in this server's cache
![image](https://user-images.githubusercontent.com/63628806/235054743-14e4696e-48b9-4732-8d34-b67826c9fff6.png)
Fetch the list of all the names of the images in this server's welcome image cache: [p]welcomeset greetings image list
![image](https://user-images.githubusercontent.com/63628806/235045324-5fb879bb-7cdb-417f-a6dc-8e51f04c178a.png)
If there are no images in the cache yet
When there are images in the cache
![image](https://user-images.githubusercontent.com/63628806/235052300-c3921d08-3bb9-4472-8633-977a345629c3.png)