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

Update imgur.py #304

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Update imgur.py #304

wants to merge 1 commit into from

Conversation

dngfx
Copy link
Contributor

@dngfx dngfx commented Mar 6, 2021

Add $rehost feature to rehost any image/video url (under 10mb) to imgur, anonymously. Only works if user has the "rehost" or "*" permissions.

Add $rehost feature to rehost any image/video url (under 10mb) to imgur, anonymously. Only works if user has the "rehost" or "*" permissions.
@examknow examknow changed the base branch from master to develop February 13, 2022 22:32
@@ -150,3 +150,33 @@ def imgur(self, event):
event["stdout"].write(result)
else:
raise utils.EventResultsError()

@utils.hook("received.command.rehost", channel_only=True)
Copy link
Member

Choose a reason for hiding this comment

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

why is channel_only necessary here?

Comment on lines +173 to +175
if page["success"] is not True:
event["stderr"].write("Image upload successful")
return
Copy link
Member

Choose a reason for hiding this comment

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

If success is not true, then why are we saying that the upload was successful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants