Skip to content

Make client parameter mandatory for wait_for_deletion#1117

Merged
MarkKoz merged 1 commit into
masterfrom
bug/1112/backend/wait-for-deletion-client
Aug 20, 2020
Merged

Make client parameter mandatory for wait_for_deletion#1117
MarkKoz merged 1 commit into
masterfrom
bug/1112/backend/wait-for-deletion-client

Conversation

@MarkKoz
Copy link
Copy Markdown
Contributor

@MarkKoz MarkKoz commented Aug 20, 2020

A client instance is necessary for the core feature of this function. There is no way to obtain it from the other arguments. The previous code was wrong to think discord.Guild.me is an equivalent.

Fixes #1112

A client instance is necessary for the core feature of this function.
There is no way to obtain it from the other arguments. The previous
code was wrong to think `discord.Guild.me` is an equivalent.

Fixes #1112
@MarkKoz MarkKoz added t: bug Something isn't working a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) p: 3 - low Low Priority labels Aug 20, 2020
@MarkKoz MarkKoz requested a review from a team as a code owner August 20, 2020 18:03
@MarkKoz MarkKoz requested review from eivl and kosayoda and removed request for a team August 20, 2020 18:03
@ghost ghost added the needs 2 approvals label Aug 20, 2020
@Numerlor
Copy link
Copy Markdown
Contributor

Works fine but figured I'd mention it since you changed it in all the other places, this usage still passes the client as a kwarg:

await wait_for_deletion(msg, (ctx.author.id,), client=self.bot)

@MarkKoz
Copy link
Copy Markdown
Contributor Author

MarkKoz commented Aug 20, 2020

Works fine but figured I'd mention it since you changed it in all the other places, this usage still passes the client as a kwarg:

Oh well.

@MarkKoz MarkKoz merged commit 63c0b1b into master Aug 20, 2020
@MarkKoz MarkKoz deleted the bug/1112/backend/wait-for-deletion-client branch August 20, 2020 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) p: 3 - low Low Priority t: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wait_for_deletion from bot/utils/messages.py raises an exception if the client parameter is not specified, although it's optional

3 participants