Skip to content

Conversation

Dorukyum
Copy link
Member

Summary

Also refactored discord/commands.py

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

description = (
kwargs.get("description")
or inspect.cleandoc(func.__doc__)
or "No description set"
Copy link
Contributor

Choose a reason for hiding this comment

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

We should raise an error if no description is given. it makes more sense as an extension of the API

options.pop(list(options)[0])
for a, o in options:
if o.name == None:
if not o.name:
Copy link
Contributor

Choose a reason for hiding this comment

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

if o.name is None would be better if we are only checking for None

"name": self.name,
"description": self.description,
"options": [o.to_dict() for o in self.options],
"guild_ids": self.guild_ids,
Copy link
Contributor

Choose a reason for hiding this comment

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

We want guild_ids to be left out of this if guild_ids is None

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