Skip to content
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

January 2021 Update #37

Merged
merged 12 commits into from
Mar 25, 2021
Merged

January 2021 Update #37

merged 12 commits into from
Mar 25, 2021

Conversation

Pythonic-Rainbow
Copy link
Member

@Pythonic-Rainbow Pythonic-Rainbow commented Jan 23, 2021

+ Added ro.py in libs.yml
+ Many embed that displayed a member's name/discriminator/id now directly mentions the member.
* Code refactor and clean up.
+ Redesign ?libs

moderation.py

A large amount of code has been extracted to 2 methods.

* Fixed a bug which Moderators with no Library Developer role can't invoke moderation commands
^ Many commands now work.

I didn't test ?reason ?duration as I didn't have the database on my working dir.

@Pythonic-Rainbow Pythonic-Rainbow added the proposal Feature requests that warrant a discussion. label Jan 23, 2021
@Pythonic-Rainbow Pythonic-Rainbow self-assigned this Jan 23, 2021
@Pythonic-Rainbow Pythonic-Rainbow marked this pull request as draft January 23, 2021 06:11
@Pythonic-Rainbow
Copy link
Member Author

Please note that for this to work, Member intent has to be enabled on Discord DevPortal as demonstrated in #developer_spot.

@Pythonic-Rainbow
Copy link
Member Author

Pythonic-Rainbow commented Jan 23, 2021

Also, @jmk-developer suggested that we might want to redesign the layout of ?libs as he thinks its too messy.

My current proposal is a layout like this

**Python**
[ro.py](their repo link): By jmkdev (jmkdev#0001) and iranathan(iranathan#5611)

...
**Java**
~~[Javablox](repo link): By Pythonic_Rainbow (Rainbow Breathing#7219)~~

where libs with a strike means dead libs.

I am thinking, should we keep those dead libs in libs.yml?

In the future, we might just migrate the list in libs.yml into the database, which should allow us to update the table by typing commands.

cogs/moderation.py Outdated Show resolved Hide resolved
cogs/moderation.py Outdated Show resolved Hide resolved
@sbhadr
Copy link
Member

sbhadr commented Jan 23, 2021

Please note that for this to work, Member intent has to be enabled on Discord DevPortal as demonstrated in #developer_spot.

Has been enabled.

Also, @jmk-developer suggested that we might want to redesign the layout of ?libs as he thinks its too messy.

My current proposal is a layout like this

**Python**
[ro.py](their repo link): By jmkdev (jmkdev#0001) and iranathan(iranathan#5611)

...
**Java**
~~[Javablox](repo link): By Pythonic_Rainbow (Rainbow Breathing#7219)~~

where libs with a strike means dead libs.

I am thinking, should we keep those dead libs in libs.yml?

In the future, we might just migrate the list in libs.yml into the database, which should allow us to update the table by typing commands.

I do think that it needs a redesign but, striking out libraries as opposed to not having them in the list takes up a lot of unneeded space for seemingly no reason. I think the best course of action would be a command like:

?libs <language> where it returns all of the channels and links in the under the python_channelname abbreviation. Not only would it be more versatile but, we wouldn't have to update the list manually as much as compared to having a mod create the actual channel. A yml file is much more simplistic / stylistic than a json file would be (what we used previously iirc) and I really do not want to go back to using a json file. I'm more-so looking for automated & less manual stuff so that it's easier to integrate and the reliance on restarting the bot entirely to pull latest changes can be dropped especially with static files that could be dynamic such as the yml. Some commands however, deserve to be static so, in that sole case, it's fine. Lmk what you think. Thanks for the pull request & maintenance of this.

@Pythonic-Rainbow
Copy link
Member Author

Pythonic-Rainbow commented Jan 24, 2021

If I want to create a new python file, is there anything need to change on generate.py?

The new code heavily relies on moderation.xxx_embed() functions. Might want to create a new class for it.

@Pythonic-Rainbow
Copy link
Member Author

Pythonic-Rainbow commented Jan 24, 2021

Also can we create a ERROR_LOG_CHANNEL in .env?
Seems to ease development cuz i have to keep changing the channel ID

@Pythonic-Rainbow
Copy link
Member Author

Pythonic-Rainbow commented Jan 24, 2021

Code refactor is completed. Now it's just the matter of whether to update this or not.

?libs <language> where it returns all of the channels and links in the under the python_channelname abbreviation.

Can you give me a demo response in Markdown?

@Pythonic-Rainbow Pythonic-Rainbow marked this pull request as ready for review January 24, 2021 02:54
@sbhadr
Copy link
Member

sbhadr commented Jan 24, 2021

If I want to create a new python file, is there anything need to change on generate.py?

The new code heavily relies on moderation.xxx_embed() functions. Might want to create a new class for it.

Generates static files. If you have a static file that needs to be generated on restart (i.e re-cached) then, it makes sense to add it here. Otherwise, the file will not update. https://github.com/RbxAPI/Docs-Bot/blob/rewrite/generate.py#L57

Also can we create a ERROR_LOG_CHANNEL in .env?
Seems to ease development cuz i have to keep changing the channel ID

Probably a good idea.

Can you give me a demo response in Markdown?

Sure.

Karen: ?libs python
Docs:

Python
Library A - Author, link, channel
Library B - Author, link, channel
Library C - Author, link, channel

Karen: ?libs js
Docs:

Javascript
Library A - Author, link, channel
Library B - Author, link, channel
Library C - Author, link, channel

Something like this that is simple but, gets the job done.

@Pythonic-Rainbow Pythonic-Rainbow marked this pull request as draft January 24, 2021 23:55
@Pythonic-Rainbow Pythonic-Rainbow marked this pull request as ready for review January 24, 2021 23:55
@Pythonic-Rainbow
Copy link
Member Author

So we are purging dead libs?

@jmkd3v
Copy link

jmkd3v commented Jan 25, 2021

I hope so 😞

@Pythonic-Rainbow
Copy link
Member Author

image
How does this look like

@tacheometry
Copy link

I think it should only mention the channel name in the field value and only have the repo link & name as the title of each field

@sbhadr
Copy link
Member

sbhadr commented Jan 25, 2021

So we are purging dead libs?

Correct.

image
How does this look like

I think that the linked author name is a bit redundant. I think it should just be renamed to source or repo.

I think it should only mention the channel name in the field value and only have the repo link & name as the title of each field

Provide a visual representation as to what this means.

@tacheometry
Copy link

tacheometry commented Jan 25, 2021

Provide a visual representation as to what this means.

image
Just realized, you can't set links as titles.

@Pythonic-Rainbow
Copy link
Member Author

Pythonic-Rainbow commented Jan 25, 2021

I think that the linked author name is a bit redundant. I think it should just be renamed to source or repo.

btw iirc we linked a dev's GitHub profile because some might not be in our server

image

EmbedFactory.py Outdated Show resolved Hide resolved
cogs/tagging.py Show resolved Hide resolved
cogs/verification.py Show resolved Hide resolved
generate.py Show resolved Hide resolved
@Pythonic-Rainbow
Copy link
Member Author

Pythonic-Rainbow commented Jan 25, 2021

Supports multi-author. This should be the final format. @jmkd3v
image

@jmkd3v
Copy link

jmkd3v commented Jan 25, 2021

Okay, looks great! Glad we can both get credit for our work. Excited to see this implemented soon!

@Pythonic-Rainbow
Copy link
Member Author

Right. Everything is set besides the above "rename EmbedFactory" thing

@Pythonic-Rainbow
Copy link
Member Author

Wat why is there conflicting files

@jmkd3v
Copy link

jmkd3v commented Jan 26, 2021

Sanjay seems to have modified main.py which you also modified?

@Pythonic-Rainbow
Copy link
Member Author

Sanjay seems to have modified main.py which you also modified?

yep just realised he pushed something

@Pythonic-Rainbow
Copy link
Member Author

Pythonic-Rainbow commented Jan 26, 2021

Resolved file conflicts.

@sbhadr
Copy link
Member

sbhadr commented Jan 28, 2021

Completing some internal things to make this PR easier to put into life. Will be a bit.

@sbhadr sbhadr added accepted Accepted proposals enhancement New feature or request labels Feb 2, 2021
@jmkd3v
Copy link

jmkd3v commented Feb 5, 2021

Any update on when this will be pushed to main?

@sbhadr
Copy link
Member

sbhadr commented Feb 6, 2021

Couple days. I'm trying to fix / improve some core stuff before I push this in.

Copy link
Member

@sbhadr sbhadr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on my end. Thanks for the PR. Merging.

@sbhadr sbhadr merged commit 569d690 into RbxAPI:rewrite Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Accepted proposals enhancement New feature or request proposal Feature requests that warrant a discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants