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

[adminutils] membersteal #47

Open
wants to merge 36 commits into
base: V3
Choose a base branch
from
Open

[adminutils] membersteal #47

wants to merge 36 commits into from

Conversation

phenom4n4n
Copy link
Contributor

Works similar to the message steal command, but allows you to steal an emoji from a member's status.

@fixator10 fixator10 added the enhancement This should make cogs better label Sep 9, 2020
@fixator10 fixator10 self-requested a review September 9, 2020 06:53
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
Copy link
Owner

@fixator10 fixator10 left a comment

Choose a reason for hiding this comment

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

About that 'name' arg... What about implementing argparse for that?

Example: https://github.com/fixator10/Fixator10-Cogs/blob/V3.leveler_abc/leveler/commands/top.py

adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
@phenom4n4n
Copy link
Contributor Author

About that 'name' arg... What about implementing argparse for that?

Example: https://github.com/fixator10/Fixator10-Cogs/blob/V3.leveler_abc/leveler/commands/top.py

I don't know much about argparse and am not motivated to look into it right now.

Copy link
Owner

@fixator10 fixator10 left a comment

Choose a reason for hiding this comment

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

Perhaps then we can add an special name _ to use original emoji's name?

like [p]emoji import _ 158155109289003029 will import emoji from 158155109289003029 with its original name

adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
adminutils/adminutils.py Outdated Show resolved Hide resolved
Copy link
Owner

@fixator10 fixator10 left a comment

Choose a reason for hiding this comment

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

wrong button

@lgtm-com
Copy link

lgtm-com bot commented Oct 10, 2020

This pull request introduces 1 alert when merging fe2b411 into 27ee04a - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@@ -189,45 +189,79 @@ async def emoji_add(self, ctx, name: str, url: str, *roles: discord.Role):
except discord.HTTPException as e:
await ctx.send(chat.error(_("An error occured on adding an emoji: {}").format(e)))
else:
msg = _("{em} created with the name `{em.name}`".format(em=em))
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
msg = _("{em} created with the name `{em.name}`".format(em=em))
msg = _("{em} created with the name `{em.name}`".format(em=e))

NameError: name 'em' is not defined

@@ -253,7 +292,7 @@ async def emoji_rename(self, ctx, emoji: discord.Emoji, name: str, *roles: disco
await ctx.send_help()
return
try:
await emoji.edit(
em = await emoji.edit(
Copy link
Owner

Choose a reason for hiding this comment

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

Seems like emoji.edit doesnt return anything, you need to re-get emoji, e.g. via em = bot.get_emoji(emoji.id)

https://discordpy.readthedocs.io/en/stable/api.html#discord.Emoji.edit

@lgtm-com
Copy link

lgtm-com bot commented Nov 7, 2020

This pull request introduces 1 alert when merging f0eeb16 into 1a28ef0 - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@lgtm-com
Copy link

lgtm-com bot commented Dec 23, 2020

This pull request introduces 1 alert when merging 88bcd45 into fd6c8e3 - view on LGTM.com

new alerts:

  • 1 for Unused local variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This should make cogs better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants