Skip to content

Conversation

A5rocks
Copy link
Contributor

@A5rocks 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

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

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

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

@FasterSpeeding
Copy link
Collaborator

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

@FasterSpeeding
Copy link
Collaborator

FasterSpeeding commented Jan 2, 2022

Grand Dad

@A5rocks
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants