Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Message and slash checks for components#154

Open
A5rocks wants to merge 3 commits intoCursed-Solutions:masterfrom
A5rocks:component-message-and-slash-checks
Open

Message and slash checks for components#154
A5rocks wants to merge 3 commits intoCursed-Solutions:masterfrom
A5rocks:component-message-and-slash-checks

Conversation

Copy link
Contributor

A5rocks commented Nov 13, 2021

Summary

Implements message and slash checks on components

Checklist

  • I have run nox and all the pipelines have passed.
  • I have made unittests according to the code I have added/modified/deleted.

Related issues

One of the todo cards iunno


async def _check_context(self, ctx: abc.Context, /) -> bool:
return await utilities.gather_checks(ctx, self._checks)
if abc.SlashContext in type(ctx).mro():
Copy link
Collaborator

FasterSpeeding Nov 14, 2021

Choose a reason for hiding this comment

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

Rather than instance check here, we could just specifically call utilitiys.gather_checks(ctx, self._slash_checks/self._message_checks) around line 645 and 656


@property
def slash_checks(self) -> collections.Collection[abc.CheckSig]:
return tuple(check.callback for check in self._slash_checks)
Copy link
Collaborator

FasterSpeeding Nov 14, 2021

Choose a reason for hiding this comment

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

Could we get a quick 1 line docstring here explaining it

return self._message_commands.copy()

@property
def message_checks(self) -> collections.Collection[abc.CheckSig]:
Copy link
Collaborator

FasterSpeeding Nov 14, 2021

Choose a reason for hiding this comment

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

Could we get a quick 1 line docstring here explaining it

Copy link
Collaborator

FasterSpeeding commented Nov 20, 2021

Looks like you'll also need to rebase now ;3

Copy link
Collaborator

FasterSpeeding commented Jan 2, 2022 *
edited
Loading

Grand Dad

Copy link
Contributor Author

A5rocks commented Jan 18, 2022

Grand Dad Part 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

FasterSpeeding FasterSpeeding left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants