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

Slash Commands #46

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Slash Commands #46

wants to merge 2 commits into from

Conversation

techpluscraft
Copy link
Contributor

Adding Slash to Proj. Glow

@techpluscraft techpluscraft marked this pull request as draft January 28, 2022 00:32
@Glowstik-YT
Copy link
Owner

Dont transision commands into slash commands, instead create a cog for all the slash commands

@techpluscraft
Copy link
Contributor Author

Dont transision commands into slash commands, instead create a cog for all the slash commands

ill do that after I finish with slash

Copy link
Contributor

@VincentRPS VincentRPS left a comment

Choose a reason for hiding this comment

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

some few nits, and also what glow said

@@ -373,6 +373,7 @@
defined by the Mozilla Public License, v. 2.0. """

import time
from unicodedata import name
Copy link
Contributor

Choose a reason for hiding this comment

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

unused import?

@commands.command(description="Shows the user's info.")
async def userinfo(self, ctx, *, user: nextcord.Member = None): # b'\xfc'
@slash_command(name="userinfo",description="Shows the user's info.")
async def userinfo(self, interaction:Interaction, *, user: nextcord.Member = None): # b'\xfc'
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesn't follow pep8, aswell as the one on the top and others

@slash_command(name="emojiadd", description="Adds an emoji to the server.")
async def emojiadd(self, interaction:Interaction, url: str, *, name):
guild = interaction.guild
if interaction.user.guild_permissions.manage_emojis:
async with aiohttp.ClientSession() as ses:
async with ses.get(url) as r:
Copy link
Contributor

Choose a reason for hiding this comment

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

because of api latency etc, maybe defer this?

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.

3 participants