-
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

Creating Directory To Store Images (Has folders for each server)

Before
After

Ensure Directory To Store Images For Specific Server exists: ensureCurrentServerHasImgCache()

Before
After

Random Welcome Image Generation: generateRandWelcomeImg()


3 Passes of the the random image generator
Welcome Image toggle on and off: [p]welcomeset greetings toggleimg

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

If there are images in cache, and currently toggled false, toggle true

If there are images in cache, and currently toggled true, toggle false

Fetch Image Template: [p]welcomeset greetings image template

Add a new image: [p]welcomeset greetings image add

if an image is added with an unused name
if image is added, but name is already in use

if command is used, but no image is provided

if command is used, but multiple images are provided

Remove an existing image by name: [p]welcomeset greetings image remove

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

if last image removed, toggles off random image generation

View an image, fetched from server's image cache by name: [p]welcomeset greetings image view

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

Fetch the list of all the names of the images in this server's welcome image cache: [p]welcomeset greetings image list

If there are no images in the cache yet
When there are images in the cache
