fix (utils): Remove null view from send args.
This commit is contained in:
@@ -25,6 +25,8 @@ multiselect_regex = re.compile(
|
|||||||
tick = '✅'
|
tick = '✅'
|
||||||
cross = '❌'
|
cross = '❌'
|
||||||
|
|
||||||
|
MISSING = object()
|
||||||
|
|
||||||
|
|
||||||
class MessageArgs:
|
class MessageArgs:
|
||||||
"""
|
"""
|
||||||
@@ -113,7 +115,13 @@ class MessageArgs:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def send_args(self) -> dict:
|
def send_args(self) -> dict:
|
||||||
return self.kwargs
|
if self.kwargs.get('view', MISSING) is None:
|
||||||
|
kwargs = self.kwargs.copy()
|
||||||
|
kwargs.pop('view')
|
||||||
|
else:
|
||||||
|
kwargs = self.kwargs
|
||||||
|
|
||||||
|
return kwargs
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def edit_args(self) -> dict:
|
def edit_args(self) -> dict:
|
||||||
|
|||||||
Reference in New Issue
Block a user